Gentoo Archives: gentoo-user

From: Mike Gilbert <floppym@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] export LC_CTYPE=en_US.UTF-8
Date: Tue, 06 Aug 2013 15:14:19
Message-Id: CAJ0EP42ZTUYbaCYbE0mnzvzVxPSRh7ZD6g8jyMqP=9j7cmJ_1Q@mail.gmail.com
In Reply to: Re: [gentoo-user] export LC_CTYPE=en_US.UTF-8 by Chris Stankevitz
1 On Mon, Aug 5, 2013 at 6:52 PM, Chris Stankevitz
2 <chrisstankevitz@×××××.com> wrote:
3 > On Mon, Aug 5, 2013 at 11:53 AM, Mike Gilbert <floppym@g.o> wrote:
4 >> The handbook documents setting a system-wide default locale. You
5 >> generally do this by setting the LANG variable in
6 >> /etc/conf.d/02locale.
7 >>
8 >> http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=1&chap=8#doc_chap3_sect3
9 >
10 > Mike,
11 >
12 > Thank you for your help. I attempted to follow these instructions and
13 > ran into three problems. Can you please confirm the fixes I employed
14 > to deal with each of these issues:
15 >
16
17 I think the other responses in the thread have this covered, but I
18 will respond anyway.
19
20 > 1. The handbook suggests I should modify the file /etc/env.d/02locale,
21 > but that file does not exist on my system. RESOLUTION: create the
22 > file
23 >
24
25 Correct. This file can also be created by using eselect locale.
26
27 > 2. The handbook suggests I should add this line to
28 > /etc/env.d/02locale: 'LANG="de_DE.UTF-8"', but I do not speak the
29 > language "DE". RESOLUTION: type instead 'LANG="en_US.UTF-8"' to match
30 > /etc/locale.gen
31 >
32
33 Right, the de_DE is just an example. You should select a
34 language/country that matches your lingual ability. :-)
35
36 > 3. The handbook suggests that I should add this line to
37 > /etc/env.d/02locale: 'LC_COLLATE="C"', but I do not know if they are
38 > again talking about the language "DE". RESOLUTION: I assumed
39 > LC_COLLATE=C refers to english and added the line without
40 > modification.
41 >
42
43 LC_COLLATE specifies how to sort text strings. Setting it to "C"
44 indicates that you want to sort strings based on the binary (ASCII)
45 value of their characters.
46
47 Leaving LC_COLLATE unset will cause strings to be sorted according to
48 the normal rules associated with your locale.
49
50 For example, given the following strings:
51
52 cat
53 Dog
54
55 With LC_COLLATE="C", they are sorted like this, since the binary value
56 of "D" (66) is less than the value of "c" (99).
57
58 Dog
59 cat
60
61 With LC_COLLATE="en_US.UTF-8", they are sorted like this, since "c"
62 comes before "D" in the alphabet.
63
64 cat
65 Dog

Replies

Subject Author
Re: [gentoo-user] export LC_CTYPE=en_US.UTF-8 Chris Stankevitz <chrisstankevitz@×××××.com>