[issue20906] Issues in Unicode HOWTO

Antoine Pitrou report at bugs.python.org
Sat Mar 22 01:56:44 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>
<http://bugs.python.org/issue20906>
_______________________________________


More information about the Python-bugs-list mailing list