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, izbyshev, methane, paul.moore, steve.dower, tim.golden, u36959, vstinner, zach.ware
Date 2020-12-22.23:32:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1608679940.47.0.11166462956.issue42707@roundup.psfhosted.org>
In-reply-to
Content
I think using Console codepage for stdio is better. But I am afraid about breaking existing code.
How about treating only UTF-8 and leave legacy environment as-is?

* When GetConsoleCP() returns CP_UTF8, use UTF-8 for stdin. Otherwise, use ANSI.
* When GetConsoleOutputCP() returns CP_UTF8, use UTF-8 for stdout. Otherwise, use ANSI.

This will work nice with PowerShell or cmd with `chcp 65001` in most simple cases.
History
Date User Action Args
2020-12-22 23:32:20methanesetrecipients: + methane, paul.moore, vstinner, tim.golden, zach.ware, eryksun, steve.dower, izbyshev, u36959
2020-12-22 23:32:20methanesetmessageid: <1608679940.47.0.11166462956.issue42707@roundup.psfhosted.org>
2020-12-22 23:32:20methanelinkissue42707 messages
2020-12-22 23:32:20methanecreate