I want to understand how locales work. In particular I've read "-bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)" and https://askubuntu.com/questions/114759/warning-setlocale-lc-all-cannot-change-locale
On my Linux Mint I did
locale-gen fr_FR.*, after that
LC_ALL=fr_FR.UTF-8 outputs "bash: warning: setlocale: LC_ALL: cannot change locale (fr_FR.UTF-8)". However
locale after that shows "LC_NAME=fr_FR.UTF-8", etc., so locale variables are changed. Why write "cannot change locale"?
LC_NAME=qq_QQ.UTF-8 (non-existent? locale) and the result is same - warning,
locale output updated.
I've noted there is no warning only in case new assignment was already generated before that bash terminal is started. In line with that
bash -c "LC_NAME=fr_FR.UTF-8" produced no warning.
Command from https://askubuntu.com/questions/114759/warning-setlocale-lc-all-cannot-change-locale
sudo update-locale LANG=fr_FR did not get rid of the warning.
I have suspicion current bash session has hold of
/etc/defaults/locale and other files so
locale-gen has no effect on that. Correct?
strace output is (yet) too complex for me to read, I only have not found
/etc/defaults/locale in it.
System Linux Mint 20.2 (Ubuntu based). I've used
locale-gen name.* IIRC cause I've read that line somewhere and also output showed it is exactly locales for
done. Now upon reading the answer and man page of
locale-gen I've tried to comment out name.* in
sudo locale-gen, then un-comment
name.UTF-8 back and run
sudo locale-gen again. The result is same as before when running