On Thu, Jun 16, 2011 at 9:22 AM, Nikos Chantziaras <rea...@arcor.de> wrote:
> On 06/16/2011 06:45 PM, Mark Knecht wrote:
>>
>> Is there a simple explanation concerning the difference between the
>> two locales I have seen on Gentoo machines?
>>
>> 1) /etc/locale, as specified in the installation documents
>>
>> 2) /etc/env.d/02locale as has been discussed on the list recently
>
> There is no /etc/locale.  I assume you mean /etc/locale.gen.

I did. thanks.

> That one only
> contains the locales for glibc.  You should not specify env vars there.  You
> only list raw locales.  Mine for example has these contents:
>
>  en_US ISO-8859-1
>  en_US.UTF-8 UTF-8
>

As does mine.


> /etc/env.d/02locale is of a different format.  It's executed as a script, so
> you set your locale-specific env vars there.  You only need LANG actually,
> and possibly LC_COLLATE.  The whole contents of mine:
>
>  LANG="en_US.UTF-8"
>  LC_COLLATE="C"
>

I had the first line but not the second which I've added.

I think the root of my question is really the (possibly) unfortunately
use of the word 'locale' for the glibc stuff. I understand the concept
of locales for the system and users, but why does glibc need locales
which are possibly different from those in use on a system by users?

I can make up reasons, like someone from Japan logs into my server to
do work and needs something to use Japanese locales, but he could
likely set those up in .bashrc or something. What is glibc doing with
them?

Thanks,
Mark

Reply via email to