Eryk Sun <eryk...@gmail.com> added the comment:

> But please discuss it in another issue.

What's returned by locale.get_locale_encoding() and 
locale.get_current_locale_encoding() is relevant to adding them as new 
functions and is a chance to implement this correctly in Windows. 

You're right that what open() does for encoding="locale" is a separate issue, 
with backwards compatibility problems. I think it was implemented badly and 
needlessly inconsistent with POSIX. But we may be stuck with the behavior 
considering scripts are within their rights, per documented behavior, to expect 
that calling setlocale(LC_CTYPE, locale_name) in Windows has no effect on the 
result of locale.getpreferredencoding(False), unlike POSIX generally, except 
for some platforms such as macOS and Android.

----------

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

Reply via email to