gabor wrote:
> could you explain to me what's the difference between LC_ALL and LANG?
>
> until now i'm using export LC_ALL=en_US.UTF-8 in /etc/profile...
> should i change it to LANG=en_US.UTF-8?
If you don't use other LC_{category}, there is no difference.
But if you use it with these variables, there it is:
LANG is fallback, overridden by all other LC_* variables.
LC_ALL is enforcement, and overrides LANG and all LC_{category}
variables. It means: if you define LC_ALL, sessing LC_{category} has no
effect.
There is an example:
utx$ ( export LANG=C LC_NUMERIC=C LC_ALL=C ; printf "%'5.3f\\n" 1 )
1.000
utx$ ( export LANG=C LC_NUMERIC=C LC_ALL=cs_CZ ; printf "%'5.3f\\n" 1 )
1,000
utx$ ( export LANG=cs_CZ LC_NUMERIC=C LC_ALL=C ; printf "%'5.3f\\n" 1 )
1.000
utx$ ( export LANG=C LC_NUMERIC=cs_CZ LC_ALL=C ; printf "%'5.3f\\n" 1 )
1.000
utx$ ( export LANG=C LC_NUMERIC=cs_CZ ; printf "%'5.3f\\n" 1 )
1,000
Note: Script programmers do often a mistake, using following
construction:
LC_TIME=C date
It works incorrectly, if you have LC_ALL set to any language.
--
Stanislav Brabec
http://www.penguin.cz/~utx, ICQ 116020046
--
[EMAIL PROTECTED] mailing list