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 methane, vstinner
Date 2021-03-19.14:57:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1616165832.62.0.0630082984.issue43510@roundup.psfhosted.org>
In-reply-to
Content
> (1) "UTF-8" in the UTF-8 Mode, or the locale encoding
> (2) Always use the locale encoding, ignore the UTF-8 Mode
>
> What I don't expect is the current behavior, before PEP 597. Who uses open() without specifying an encoding but always want to use the locale encoding? (case 2) So this use case is already broken when the UTF-8 Mode is enabled explicitly?

Yes, it is broken already.  So they can not use UTF-8 mode.

If `encoding="locale"` ignore UTF-8 mode, it save the use case. They can add `encoding="locale"` where they need to use locale/GetACP encoding and enable UTF-8 mode.

That's why it is important If we enable UTF-8 mode by default in the future.
History
Date User Action Args
2021-03-19 14:57:12methanesetrecipients: + methane, vstinner
2021-03-19 14:57:12methanesetmessageid: <1616165832.62.0.0630082984.issue43510@roundup.psfhosted.org>
2021-03-19 14:57:12methanelinkissue43510 messages
2021-03-19 14:57:12methanecreate