[issue23901] Force console stdout to use UTF8 on Windows

STINNER Victor report at bugs.python.org
Sun Apr 19 01:03:01 CEST 2015


STINNER Victor added the comment:

If sys.stdout is modified, it must be carefully tested in various scenario:

- Windows console, default config
- Windows console, TrueType font
- PowerShell => see #21927, it looks like PowerShell has its own set of Unicode issues
- Redirect output into a file
- etc.

Very good articles by Michael S. Kaplan on Windows stdout/console:
- "Conventional wisdom is retarded, aka What the @#%&* is _O_U16TEXT?"
  http://www.siao2.com/2008/03/18/8306597.aspx
- "Myth busting in the console"
  http://www.siao2.com/2010/10/07/10072032.aspx
- "Cunningly conquering communicated console caveats. Comprende, mon Capitán?"
  http://www.siao2.com/2010/05/07/10008232.aspx

See also fwide() function.

Good luck...

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23901>
_______________________________________


More information about the Python-bugs-list mailing list