On 3/26/25 8:20 AM, Léa Gris wrote:
I am onto something here :

No, not really. It's pretty simple.

$ LC_ALL=C bash -c 'locale; printf "\\nEnvironment variable: LC_NUMERIC=%s\ \n" "$LC_NUMERIC"'

LC_ALL overrides LC_NUMERIC, as explained in the POSIX reference I sent.
Setting LC_ALL doesn't change LC_NUMERIC.


Environment variable: LC_NUMERIC=fr_FR.UTF-8

Setting LC_ALL=C actually switches the locale keys but not the corresponding environment variables.

Correct. More precisely, LC_ALL has higher precedence than the other
LC_ environment variables, so its value is reflected in all the
locale categories.

But setting LC_NUMERIC=C sets the environment variable **and** the corresponding locale key

Yes, according to the precedence.


--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/

Reply via email to