On Tue, Jun 12, 2001 at 07:32:57 +0200, Joerg Wunsch wrote:
> I thought of two components, like ru_RU, en_US, or de_DE. AFAICT,
> that's the common practice i've seen in the other Unices.
Lets swith to i18n list, I Cc: here first time to notice -current readers.
> > But then we need to rewrite all old programs which parse LANG
> > directly to use nl_langinfo(CODESET).
> I didn't know that programs parse the name of the locale directly, i
> always thought they just use the contents of files pointed to by this
> name (under /usr/share/locale/), i. e. the actual local name would be
> opaque to the application.
> Do you have an example of a program parsing the name? I can't imagine
> right now who does it and why...
I can't remember much of them at this moment, but here are few examples:
Look at libreadline code in contrib f.e. Current readline version not
apply locale name parsing if setlocale() present, but old one do it.
Readline use it to determine that codeset is 8bit, I saw other usages
Moreover, all perl scripts parsing LANG are automatically affected (i.e.
can't get codeset) because there is no nl_langinfo() in perl5 at all.
Example: catman (our)
Moreover, all shell scripts parsing LANG are affected, the same.
Example: neqn, nroff (3rd party)
Since there is no internal nl_langinfo() in shell/perl, external binary
utility must be used to pick codeset, commonly it is:
call. We don't have this utility, so I object to short names until it will
be present (maybe in reduced to charmap arg only form, as call to
> Apart from that, those old applications would fall over the locale
> name change anyway (e. g. they expect "de_DE.ISO_8859-1" but find
> "de_DE.ISO8859-1" which they are not prepared to handle), so that's
> really a good reason to introduce the lang_TERRITORY shorthands by the
> same time (i'm speaking of -current only!).
Most of parsing code compact codeset first, i.e. remove all "_" and
"-" characters from codeset, lowercase it, then compare.
Andrey A. Chernov
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message