Le 26/03/2025 à 12:54, Andreas Kähäri wrote :
On my Alpine system (bash 5.3.37), LC_NUMERIC is unset, and setting
LC_ALL does not automagically set LC_NUMERIC in "bash -c":
% LC_ALL=C bash -c 'echo "$LC_NUMERIC"'
(blank line output)
% LANG=C bash -c 'echo "$LC_NUMERIC"'
(blank line output)
On my Ubuntu 24.04 system:
$ locale
LANG=fr_FR.UTF-8
LANGUAGE=fr_FR:fr_CA:en
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC=fr_FR.UTF-8
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=
$ LC_ALL=C locale
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
I wonder if locale is switched accordingly to environment variables, but
environment variables may not automatically switch to the new locale.
--
Léa Gris