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