Author vstinner
Recipients amaury.forgeotdarc, loewis, ocean-city, vstinner
Date 2011-06-16.23:42:33
SpamBayes Score 0.00616902
Marked as misclassified No
Message-id <1308267754.97.0.955017346382.issue12281@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2011-06-16 23:42:35vstinnersetrecipients: + vstinner, loewis, amaury.forgeotdarc, ocean-city
2011-06-16 23:42:34vstinnersetmessageid: <1308267754.97.0.955017346382.issue12281@psf.upfronthosting.co.za>
2011-06-16 23:42:34vstinnerlinkissue12281 messages
2011-06-16 23:42:34vstinnercreate