I am onto something here :
$ LC_ALL=C bash -c 'locale; printf "\\nEnvironment variable:
LC_NUMERIC=%s\\n" "$LC_NUMERIC"'
Output:
LANG=fr_FR.UTF-8
LANGUAGE=fr_FR:fr_CA:en
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=C
Environment variable: LC_NUMERIC=fr_FR.UTF-8
Setting LC_ALL=C actually switches the locale keys but not the
corresponding environment variables.
But setting LC_NUMERIC=C sets the environment variable **and** the
corresponding locale key
$ LC_NUMERIC=C bash -c 'locale; printf "\\nEnvironment variable:
LC_NUMERIC=%s\\n" "$LC_NUMERIC"'
LANG=fr_FR.UTF-8
LANGUAGE=fr_FR:fr_CA:en
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC=C
LC_TIME=fr_FR.UTF-8
LC_COLLATE="fr_FR.UTF-8"
LC_MONETARY=fr_FR.UTF-8
LC_MESSAGES="fr_FR.UTF-8"
LC_PAPER=fr_FR.UTF-8
LC_NAME=fr_FR.UTF-8
LC_ADDRESS=fr_FR.UTF-8
LC_TELEPHONE=fr_FR.UTF-8
LC_MEASUREMENT=fr_FR.UTF-8
LC_IDENTIFICATION=fr_FR.UTF-8
LC_ALL=
Environment variable: LC_NUMERIC=C
--
Léa Gris