[docs] [issue20906] Issues in Unicode HOWTO

Antoine Pitrou report at bugs.python.org
Sat Mar 22 01:56:45 CET 2014

Antoine Pitrou added the comment:

> "UnicodeEncodeError: 'charmap' codec can't encode character '\u265e' in position 13: character maps to undefined". 

That's because stdout is treated as a regular bytestream under Windows (as it is under POSIX), and it therefore uses the current "codepage" to encode unicode strings. See issue1602.

> And why does it work as intended on linux?

Because under most current Linux systems, stdout's encoding will be utf-8, and therefore it will be able to represent the given unicode chars.


Python tracker <report at bugs.python.org>

More information about the docs mailing list