On Wed, 5 Mar 2003, Damjan wrote:
> Is there a document that nicely explains why LC_ALL should not be used
> by distribution makers, but that LANG should be used instead.
>
> I know the reasons, but would be happy if I can augment my case with
> some "official" docs.

The reason for why a Linux distribution should set LANG in /etc/profile
is that this makes it most easy for user to override that system default
using the individual LC_* variables. If LC_ALL is set, then this
selective override functionality would not be available to users.

For example, I like to use LANG=en_GB.UTF-8 LC_COLLATE=C, because I do not
like it if ls sorts filenames "properly". I want the broken^H^H^H^H^H^Htraditional
binary sorting order that lists uppercase letters before lowercase ones.

LC_ALL is most useful to switch off any i18n-environment-variable
dependent behaviour with LC_ALL=C. Programs (such as all known Linux
releases of acroread) with loads of problems in their locale handling
are best called with LC_ALL=C.

LC_ALL is best thought of as some kind of emergency override.

(Oh: This is now a fully official Markus Kuhn email opinion and may be referenced
as such via http://mail.nl.linux.org/linux-utf8/. Hope this helped ... :)

"Thomas E. Dickey" wrote on 2003-03-05 10:31 UTC:
> isn't $LANG a GNU-specific variable?

LANG is defined by both POSIX (IEEE Std 1003.1) and ISO C.

The POSIX definition of the i18n environment variables is crucial
reading for anyone with an interest in locales:

  http://www.opengroup.org/onlinepubs/007904975/basedefs/xbd_chap08.html#tag_08_02

LANGUAGE is a GNU extension in which a priority list of locales can be
specified, separated by colons. It is an alternative to the LC_MESSAGES
defined by POSIX and only evaluated if an application uses gettext.
Read the Locales chapter in "info libc" for details. 

Markus

-- 
Markus Kuhn, Computer Lab, Univ of Cambridge, GB
http://www.cl.cam.ac.uk/~mgk25/ | __oo_O..O_oo__

--
Linux-UTF8:   i18n of Linux on all levels
Archive:      http://mail.nl.linux.org/linux-utf8/

Reply via email to