homepage

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 methane
Recipients eryksun, lemburg, methane, vstinner
Date 2021年03月19日.15:15:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1616166912.09.0.266429410501.issue43552@roundup.psfhosted.org>
In-reply-to
Content
> Please address UTF-8 mode explicitly in open() or elsewhere. The locale
> module is about the state of the lib C, not what Python enforces via
> options in its own I/O layers.
I agree with you. APIs in locale module shouldn't aware UTF-8 mode.
`locale.getpreferredencoding()` is special, because it "Return the encoding used for text data, according to user preferences. User preferences are expressed differently on different systems, and might not be available programmatically on some systems, so this function only returns a guess."
> As mentioned, both should ideally be synchronized, though, so
> UTF-8 mode in Python should trigger setting a UTF-8 encoding
> via setlocale().
There is PEP 538 already :)
History
Date User Action Args
2021年03月19日 15:15:12methanesetrecipients: + methane, lemburg, vstinner, eryksun
2021年03月19日 15:15:12methanesetmessageid: <1616166912.09.0.266429410501.issue43552@roundup.psfhosted.org>
2021年03月19日 15:15:12methanelinkissue43552 messages
2021年03月19日 15:15:12methanecreate

AltStyle によって変換されたページ (->オリジナル) /