STINNER Victor <victor.stin...@haypocalc.com> added the comment: Decode examples, ANSI=cp932:
>>> codecs.code_page_decode(1252, b'\x80') ('\u20ac', 1) >>> codecs.code_page_decode(932, b'\x82') ... UnicodeDecodeError: 'mbcs' codec can't decode bytes in position 0--1: No mapping for the Unicode character exists in the target code page. >>> codecs.code_page_decode(932, b'\x82', 'replace') ('・', 1) >>> codecs.code_page_decode(932, b'\x82', 'ignore') ('', 0) Oh, the encoding name is wrong in the decoding errors. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue12281> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com