why does `LANG` not influence the locale in GNU/Linux

Carlos O'Donell carlos@redhat.com
Thu Jan 27 05:53:37 GMT 2022


On 1/27/22 00:40, Godmar Back wrote:
> It's slightly ironic if you read, for instance PEP-538 [*] that claims
> that Python has a need "to use the configured locale encoding by
> default for consistency with other locale-aware components in the same
> process or subprocesses" when the default behavior in a Unix
> environment is to not be locale-aware and revert back to the C locale.

Nick Coghlan is the author of PEP-538, and not coincidentally, opened bug 17318
which we just resolved for glibc 2.35 with the addition of a C.UTF-8 that
harmonizes the downstream distribution implementations (and minimized it).

The creation of C.UTF-8 was partly driven by GNOME and Python needs to have
an "always on" UTF-8 encoded locale that could be used as a fallback, rather
than the ASCII C/POSIX locale [1][2].

I feel like this is less about locale awareness and more about the encoding of
information using UTF-8 by default.
 
> [*] https://www.python.org/dev/peps/pep-0538/

-- 
Cheers,
Carlos.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1313818
[2] https://sourceware.org/bugzilla/show_bug.cgi?id=17318



More information about the Libc-help mailing list