Message 380261 - Python tracker

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.

Content
I don't think UTF-8 mode should override os.device_encoding() on Windows.

UTF-8 mode can be used to ignore legacy locale encoding, and os.device_encoding() uses the locale encoding on Unix. So overriding it make sense.

But locale encoding and console cp are different on Windows. Users may want to know console cp even when they want to use UTF-8 by default for reading/writing text files.