[arch-general] Where's my locale gone?
gdamjan at gmail.com
Mon Nov 3 14:51:27 UTC 2014
> Any chance this helps? https://wiki.archlinux.org/index.php/Locale
> Also, how about setting LANG=en_GB.utf8 inside /etc/locale.conf and
> ~/.config/locale.conf ?
> Now, about the UTF-8 and utf8 difference: I am not sure if there is any,
> but both localectl list-locales and locale -a use "utf8" in my system.
the canonical name is UTF-8 and that's the one that should be used,
glibc normalizes that to lowercase and removes the dashes and
underscores when it searches the archive
(because of legacy iso-8859-x charsets which didn't have a clear
standard how to write them down)
I don't know of programs that will use ~/.config/locale.conf.
Most (if not all) Linux/glibc programs use the LANG and LC_*
environment variables. So to have a working locale in your
environment, you have to know how unix environment variables are
inherited and from where in your case.
Also, always use just the LANG variable to set the locale, only use
LC_CTYPE etc, if you want to override some part of the locale.
Only ever use LC_ALL on the command line if you must make sure that
some hierarchy of processes will use that locale (it overrides LANG
and the other LC_ variables).
More information about the arch-general