Subject: Re: workaround for pkg/14051
To: None <bouyer@antioche.eu.org>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-userlevel
Date: 01/21/2002 05:00:02
hi.
From: Manuel Bouyer <bouyer@antioche.eu.org>
> Hi,
> PR pkg/14051 describe a problem with perl, locales and the LANG variable.
> Basically the problem is that LANG is used in a conflicting manner by 2
> different systems: NLS and locale.
> For NLS LANG is used to select the language of messages (e.g. LANG=fr).
> For locale the value of LANG is used for foi if the corresponding LC_foo
> variable isn't set, and if LC_ALL isn't set (LC_ALL has the same role as
> LANG, but takes over LANG).
>
> So setting LANG for NLS will also inpact locale (only used by third-party
> packages for now), but its value is usually invalid for the various locale
> parameters. Some packages will complain about this invalid value, as described
> in PR 14051. The solution is to set LC_ALL to "C", as LANG is only used if
> LC_ALL isn't set.
I'm not familiar with perl.
but I guess that warnings mentioned in PR are due to lack of support of
some locale categories like LC_COLLATE.
> To work around this I propose to set LC_ALL to "C" in the system files
> (/etc/csh.cshrc and /etc/profile). This can't cause any problems as
> "C" is the default value used when no variables are set, and this would
> prevent bad interractions between the NLS and locale systems.
how about other shells?
In addition, according to susv2,
%L in NLSPATH is defined as LC_MESSAGES, not LANG.
I think that we shouldn't use LANG for NLS anymore
if we want to conform to standards.
I propose:
- use LC_MESSAGES environment variable for NLS as standards.
- make symbolic links in /usr/share/nls if needed.
(eg. de_DE.ISO8859-1 -> de)
(or change default NLSPATH to use %l and implement %l ?)
- store encoding infomation into NLS(gencat) databases for
future encoding conversion.
- (optional) define non-standard NLSPATH keyword(eg. %X) that indicate
that LANG is used. and change default NLSPATH to use it if no others
are available.
---
YAMAMOTO Takashi<yamt@mwd.biglobe.ne.jp>