Gentoo Archives: gentoo-user

From: Nikos Chantziaras <realnc@×××××.de>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: /etc/locale vs /etc/env.d/02locale?
Date: Thu, 16 Jun 2011 17:11:24
Message-Id: itdc32$7pe$1@dough.gmane.org
In Reply to: Re: [gentoo-user] /etc/locale vs /etc/env.d/02locale? by Mark Knecht
1 On 06/16/2011 07:23 PM, Mark Knecht wrote:
2 > On Thu, Jun 16, 2011 at 9:00 AM, Paul Hartman
3 > <paul.hartman+gentoo@×××××.com> wrote:
4 >> On Thu, Jun 16, 2011 at 10:45 AM, Mark Knecht<markknecht@×××××.com> wrote:
5 >>> Is there a simple explanation concerning the difference between the
6 >>> two locales I have seen on Gentoo machines?
7 >>>
8 >>> 1) /etc/locale, as specified in the installation documents
9 >>>
10 >>> 2) /etc/env.d/02locale as has been discussed on the list recently
11 >>
12 >> I'm not near a Gentoo machine right now, but off the top of my head IIRC:
13 >>
14 >> /etc/locale.gen contains a list of locales to be compiled when glibc
15 >> is emerged. These will be available to be used.
16 >>
17 >> /etc/env.d/02locale specifies which of those locales you actually want
18 >> to use for the system-wide default (the LC variables)
19 >
20 > Thanks for the response Paul.
21 >
22 > Does that mean that the /etc/locale.gen is used only by glibc and not
23 > really by the system? If so, what is glibc doing with these beyond
24 > letting me system run programs?
25
26 It allows you to have locales to use in /etc/env.d/02locale ;-) If you
27 want to set LANG=en_US.UTF-8 in 02locale, you of course need the files
28 for that specific locale/encoding. To get them, you need to write
29 "en_US.UTF-8 UTF-8" in locale.gen. Not sure why you're not getting the
30 comments in your locale.gen, but here there are, at the top of the file:
31
32 # /etc/locale.gen: list all of the locales you want to have on your system
33 #
34 # The format of each line:
35 # <locale> <charmap>
36 #
37 # Where <locale> is a locale located in /usr/share/i18n/locales/ and
38 # where <charmap> is a charmap located in /usr/share/i18n/charmaps/.
39 #
40 # All blank lines and lines starting with # are ignored.
41 #
42 # For the default list of supported combinations, see the file:
43 # /usr/share/i18n/SUPPORTED
44 #
45 # Whenever glibc is emerged, the locales listed here will be automatically
46 # rebuilt for you. After updating this file, you can simply run
47 `locale-gen`
48 # yourself instead of re-emerging glibc.