Gentoo Archives: gentoo-user

From: Mark Knecht <markknecht@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: /etc/locale vs /etc/env.d/02locale?
Date: Thu, 16 Jun 2011 17:09:19
Message-Id: BANLkTi=9ydzLaFTm9vrO-iL438i-BQ5t0Q@mail.gmail.com
In Reply to: [gentoo-user] Re: /etc/locale vs /etc/env.d/02locale? by Nikos Chantziaras
1 On Thu, Jun 16, 2011 at 9:22 AM, Nikos Chantziaras <realnc@×××××.de> wrote:
2 > On 06/16/2011 06:45 PM, Mark Knecht wrote:
3 >>
4 >> Is there a simple explanation concerning the difference between the
5 >> two locales I have seen on Gentoo machines?
6 >>
7 >> 1) /etc/locale, as specified in the installation documents
8 >>
9 >> 2) /etc/env.d/02locale as has been discussed on the list recently
10 >
11 > There is no /etc/locale.  I assume you mean /etc/locale.gen.
12
13 I did. thanks.
14
15 > That one only
16 > contains the locales for glibc.  You should not specify env vars there.  You
17 > only list raw locales.  Mine for example has these contents:
18 >
19 >  en_US ISO-8859-1
20 >  en_US.UTF-8 UTF-8
21 >
22
23 As does mine.
24
25
26 > /etc/env.d/02locale is of a different format.  It's executed as a script, so
27 > you set your locale-specific env vars there.  You only need LANG actually,
28 > and possibly LC_COLLATE.  The whole contents of mine:
29 >
30 >  LANG="en_US.UTF-8"
31 >  LC_COLLATE="C"
32 >
33
34 I had the first line but not the second which I've added.
35
36 I think the root of my question is really the (possibly) unfortunately
37 use of the word 'locale' for the glibc stuff. I understand the concept
38 of locales for the system and users, but why does glibc need locales
39 which are possibly different from those in use on a system by users?
40
41 I can make up reasons, like someone from Japan logs into my server to
42 do work and needs something to use Japanese locales, but he could
43 likely set those up in .bashrc or something. What is glibc doing with
44 them?
45
46 Thanks,
47 Mark

Replies

Subject Author
[gentoo-user] Re: /etc/locale vs /etc/env.d/02locale? Nikos Chantziaras <realnc@×××××.de>