[issue32238] Handle "POSIX" in the legacy locale detection

STINNER Victor report at bugs.python.org
Fri Oct 11 17:32:55 EDT 2019


STINNER Victor <vstinner at python.org> added the comment:

In Python 3.8, if the LC_CTYPE is "POSIX", the default stdio error handler is now "surrogateescape" instead of "strict", and the UTF-8 is now enabled. In short, LC_CTYPE="POSIX" now behaves as LC_CTYPE="C".

This change impacts at least FreeBSD. If I correctly, if there is no LC_ALL, LC_CTYPE or LANG environment variable on FreeBSD, the LC_CTYPE locale is "POSIX".

See bpo-34485, bpo-19977 and the "POSIX locale on FreeBSD" section of my article:
https://vstinner.github.io/python3-locales-encodings.html

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32238>
_______________________________________


More information about the Python-bugs-list mailing list