1 |
On 05/08/2013 23:52, Chris Stankevitz wrote: |
2 |
> On Mon, Aug 5, 2013 at 11:53 AM, Mike Gilbert <floppym@g.o> wrote: |
3 |
>> The handbook documents setting a system-wide default locale. You |
4 |
>> generally do this by setting the LANG variable in |
5 |
>> /etc/conf.d/02locale. |
6 |
>> |
7 |
>> http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=1&chap=8#doc_chap3_sect3 |
8 |
> |
9 |
> Mike, |
10 |
> |
11 |
> Thank you for your help. I attempted to follow these instructions and |
12 |
> ran into three problems. Can you please confirm the fixes I employed |
13 |
> to deal with each of these issues: |
14 |
> |
15 |
> 1. The handbook suggests I should modify the file /etc/env.d/02locale, |
16 |
> but that file does not exist on my system. RESOLUTION: create the |
17 |
> file |
18 |
|
19 |
Run "eselect locale", first with the "list" parameter and then the "set" |
20 |
parameter as appropriate. It's easier. |
21 |
|
22 |
> |
23 |
> 2. The handbook suggests I should add this line to |
24 |
> /etc/env.d/02locale: 'LANG="de_DE.UTF-8"', but I do not speak the |
25 |
> language "DE". RESOLUTION: type instead 'LANG="en_US.UTF-8"' to match |
26 |
> /etc/locale.gen |
27 |
|
28 |
Legitimate locales are those installed with glibc. These can be shown |
29 |
with either "eselect locale list" or "locale -a". |
30 |
|
31 |
> |
32 |
> 3. The handbook suggests that I should add this line to |
33 |
> /etc/env.d/02locale: 'LC_COLLATE="C"', but I do not know if they are |
34 |
> again talking about the language "DE". RESOLUTION: I assumed |
35 |
> LC_COLLATE=C refers to english and added the line without |
36 |
> modification. |
37 |
|
38 |
C refers to the POSIX locale [1]. |
39 |
|
40 |
Defining LC_COLLATE is a workaround for behaviour deeemed surprising to |
41 |
those otherwise unaware of the impact of collations. For example, files |
42 |
beginning with a dot might no longer appear at the top of a directory |
43 |
listing and ranges in regular expressions may be affected, depending on |
44 |
the extent to which a given program abides by the locale. Poorly written |
45 |
shell scripts that capture from ls (assuming a given order) might also |
46 |
be affected. |
47 |
|
48 |
If undefined, the value of LC_COLLATE is inherited from LANG. I'm not |
49 |
sure that overriding it is particularly useful nowadays but it doesn't hurt. |
50 |
|
51 |
--Kerin |
52 |
|
53 |
[1] |
54 |
http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap07.html#tag_07_02 |