[issue12048] Python 3, ZipFile Bug In Chinese

STINNER Victor report at bugs.python.org
Thu May 12 17:07:38 CEST 2011


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

Oh, right.

Note: the encoding looks to be GBK, not CP932:

>>> '\u590d\u4ef6'.encode('gbk')
b'\xb8\xb4\xbc\xfe'
>>> '\u590d\u4ef6'.encode('gbk').decode('cp437')
'╕┤╝■'
>>> '\u590d\u4ef6'.encode('cp932')
...
UnicodeEncodeError: 'cp932' codec can't encode character '\u590d' ...

----------

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


More information about the Python-bugs-list mailing list