Message138080
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. |
|
Date |
User |
Action |
Args |
2011-06-10 13:48:20 | vstinner | set | recipients:
+ vstinner, loewis, amaury.forgeotdarc, ocean-city |
2011-06-10 13:48:20 | vstinner | set | messageid: <1307713700.45.0.513641696145.issue12281@psf.upfronthosting.co.za> |
2011-06-10 13:48:19 | vstinner | link | issue12281 messages |
2011-06-10 13:48:19 | vstinner | create | |
|