Inada Naoki <songofaca...@gmail.com> added the comment:
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. ---------- nosy: +methane _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue42707> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com