[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

Jesse Silverman report at bugs.python.org
Tue Jun 1 16:27:47 EDT 2021


Jesse Silverman <jessevsilverman at gmail.com> added the comment:

"more.com" uses the console input codepage to decode the file, so a workaround is to run `chcp.com 65001` and run Python in UTF-8 mode, e.g. `py -X utf8=1`. Since reading non-ASCII UTF-8 is broken, you'll have to switch back to the old input codepage if you need to enter non-ASCII characters in an app that reads from the console via ReadFile or ReadConsoleA.

Confirmed that this workaround done in Windows Terminal causes all mojibake to immediately evaporate, leaving me with the most readable and enjoyable more/console experience I have ever had since first hitting a spacebar on MS-DOS.
(Windows Terminal and the open-sourcing of the CONSOLE code is in a three-way tie with open-sourcing of .Net Core and the C++ STL for changing how I feel about Windows.  I keep finding new reasons to love it, except for reading non-ASCII UTF-8 being broken which I just learned about today.)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44275>
_______________________________________


More information about the Python-bugs-list mailing list