[issue34523] Choose the filesystem encoding before Python initialization (add _PyCoreConfig.filesystem_encoding)
STINNER Victor
report at bugs.python.org
Tue Aug 28 06:21:43 EDT 2018
STINNER Victor <vstinner at redhat.com> added the comment:
The compilation failed on my PR when running PCbuild\amd64\_freeze_importlib.exe:
ValueError: only 'strict' and 'surrogateescape' error handlers are supported, not 'surrogatepass'
The error comes from locale_error_handler(). Before my change, PyUnicode_EncodeFSDefault() and PyUnicode_DecodeFSDefault() used Py_FileSystemDefaultEncodeErrors which is initialized to "surrogateescape", but only set to "surrogatepass" by initfsencoding().
With my change, the error handler is directly set to "surrogatepass", but currently, unicode_encode_locale() and unicode_decode_locale() don't accept this error handler.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34523>
_______________________________________
More information about the Python-bugs-list
mailing list