[Python-ideas] Fix default encodings on Windows

Random832 random832 at fastmail.com
Fri Aug 12 10:20:48 EDT 2016


On Wed, Aug 10, 2016, at 14:10, Steve Dower wrote:
> * force the console encoding to UTF-8 on initialize and revert on
> finalize
> 
> So what are your concerns? Suggestions?

As far as I know, the single biggest problem caused by the status quo
for console encoding is "some string containing characters not in the
console codepage is printed out; unhandled UnicodeEncodeError". Is there
any particular reason not to use errors='replace'?

Is there any particular reason for the REPL, when printing the repr of a
returned object, not to replace characters not in the stdout encoding
with backslash sequences?

Does Python provide any mechanism to access the built-in "best fit"
mappings for windows codepages (which mostly consist of removing accents
from latin letters)?


More information about the Python-ideas mailing list