Nick Coghlan <ncogh...@gmail.com> added the comment:

Victor and I were discussing the appropriate behaviour for the "What do we do 
if _Py_PreInitialize() hasn't been called?" case, and Victor pointed out that 
the potential for mojibake provides a solid rationale for going back to the 
Python 3.6 behaviour: disable both C locale coercion *and* UTF-8 mode, and 
instead leave locale management to the embedding application.

That would also get us back to the originally intended behaviour of PEP 538, 
where it only happens by default in the CLI app, not the runtime support 
library. Back when I decided that doing that would be too complicated, the 
_Py_PreInitialize API didn't exist yet, and it didn't occur to me that the 
mojibake problem would affect UTF-8 mode as well.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36202>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to