[issue19846] Setting LANG=C breaks Python 3 on Linux

Marc-Andre Lemburg report at bugs.python.org
Mon Dec 9 11:11:55 CET 2013


Marc-Andre Lemburg added the comment:

The "C" locale is part of the ANSI C standard. The "POSIX" locale is an alias for the "C" locale and a POSIX standard, so we cannot just replace the ASCII encoding with UTF-8 as we wish, so Antoine's patch won't work.

See e.g. http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap07.html

The C and POSIX locale settings are the only locale settings that are guaranteed to always exist in C libraries. Python 3 should work with such locale settings. It doesn't have to be able to output non-ASCII code points, but it should run with ASCII data.

AFAIK, Python 3 does work with ASCII data in the C locale, so I'm not sure whether this is a bug at all.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19846>
_______________________________________


More information about the Python-bugs-list mailing list