[email protected] (HE12025-12-23):
> That has always been my take, but as always, Reality (TMP) is a bit
> more complicated...
>
> There is an /etc/default/locale, which is the fallback for when no
> locale values are set in the environment.
Not true:
$ strace env -i /usr/bin/locale |& grep /etc
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
$
/etc/default/locale is parsed by PAM and a few init scripts to set up
the initial environment variables.
> This usually concerns
> "system daemons" -- database server, such things.
>
> I had to find it the hard way, when that thing was set to some
> 8 bit LANG (iso-8859-something) when initialising the PostgreSQL
> cluster. All databases created with createdb inherited that, which
> is not usually what you want. There's of course a workaround, but
> the fun is in finding out what the hell went south :-)
Yes, the braindeadness of locales is especially strong in PostgreSQL.
Regards,
--
Nicolas George