This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eryksun
Recipients eryksun, lemburg, methane, vstinner
Date 2021-03-20.01:37:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1616204235.41.0.203608660163.issue43552@roundup.psfhosted.org>
In-reply-to
Content
> 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.
History
Date User Action Args
2021-03-20 01:37:15eryksunsetrecipients: + eryksun, lemburg, vstinner, methane
2021-03-20 01:37:15eryksunsetmessageid: <1616204235.41.0.203608660163.issue43552@roundup.psfhosted.org>
2021-03-20 01:37:15eryksunlinkissue43552 messages
2021-03-20 01:37:15eryksuncreate