[Python-ideas] changing sys.stdout encoding

Niki Spahiev niki.spahiev at gmail.com
Fri Jun 8 09:23:36 CEST 2012


On  8.06.2012 00:00, Mike Meyer wrote:
> The proper encoding for the standard IO streams is generally a
> property of the environment, and hence is set in the environment. You
> have a use case where that's not the case. The argument is that your
> use case isn't common enough to justify changing the standard library.
> Can you provide evidence to the contrary? Other languages that make
> setting the encoding on the standard streams easy, or applications
> outside of those built for your system that have a "--encoding" type
> flag?

Mercurial:
...
     --debug             enable debugging output
     --debugger          start debugger
     --encoding ENCODE   set the charset encoding (default: UTF-8)
     --encodingmode MODE set the charset encoding mode (default: strict)
     --traceback         always print a traceback on exception
...

Niki




More information about the Python-ideas mailing list