[issue29898] PYTHONLEGACYWINDOWSIOENCODING isn't implemented

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 <report@bugs.python.org> <http://bugs.python.org/issue29898> _______________________________________
participants (1)
-
Steve Dower