Steve Dower added the comment:

It's actually called "PYTHONLEGACYWINDOWSSTDIO" in Python/pylifecycle.c, which 
is also what PEP 528 says it should be, so this is a docs issue.

You're correct that PYTHONIOENCODING is overridden by detection of a real 
console, however, PYTHONIOENCODING doesn't currently set a flag anywhere, and 
the (required for compatibility) defaults on Windows would make it look like 
it's always been set to something else.

In my opinion, you should set PYTHONLEGACYWINDOWSSTDIO to indicate that even 
though we know the incoming encoding (Unicode from an interactive console), you 
don't care and you want to override it with a default value. Then use 
PYTHONIOENCODING to set that default value. This is most consistent with the 
existing use of PYTHONIOENCODING (it's the default unless you know exactly 
which encoding you are getting).

----------
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29898>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to