Message138478
Patch version 5 fixes the encode/decode flags on Windows XP. The codecs give different result on XP and Seven in some cases:
Seven:
- b'\x81\x00abc'.decode('cp932', 'replace') returns '\u30fb\x00abc'
- '\udc80'.encode(CP_UTF8, 'strict') raises UnicodeEncodeError
- b'[\xed\xb2\x80]'.decode(CP_UTF8, 'strict') raises UnicodeEncodeError
- b'[\xed\xb2\x80]'.decode(CP_UTF8, 'ignore') returns '[]'
- b'[\xed\xb2\x80]'.decode(CP_UTF8, 'replace') returns '[\ufffd\ufffd\ufffd]'
XP:
- b'\x81\x00abc'.decode('cp932', 'replace') returns '\x00\x00abc'
- '\udc80'.encode(CP_UTF8, 'strict') returns b'\xed\xb2\x80'
- b'[\xed\xb2\x80]'.decode(CP_UTF8, 'strict') returns '[\udc80]'
These differences come from Windows codecs. |
|
Date |
User |
Action |
Args |
2011-06-16 23:42:35 | vstinner | set | recipients:
+ vstinner, loewis, amaury.forgeotdarc, ocean-city |
2011-06-16 23:42:34 | vstinner | set | messageid: <1308267754.97.0.955017346382.issue12281@psf.upfronthosting.co.za> |
2011-06-16 23:42:34 | vstinner | link | issue12281 messages |
2011-06-16 23:42:34 | vstinner | create | |
|