[issue26260] utf8 decoding inconsistency between P2 and P3

2016-02-01 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> not a bug status: open -> closed ___ Python tracker ___

[issue26260] utf8 decoding inconsistency between P2 and P3

2016-02-01 Thread STINNER Victor
STINNER Victor added the comment: > PAYLOAD.decode('utf8') passes in P2.7.* and fails in P3.4 Well, Python 2 decoder didn't respect the Unicode standard. Please see: http://unicodebook.readthedocs.org/issues.html#non-strict-utf-8-decoder-overlong-byte-sequences-and-surrogates Python 3 is now

[issue26260] utf8 decoding inconsistency between P2 and P3

2016-02-01 Thread Jim Jin
Jim Jin added the comment: Thank you very much for your help! -- ___ Python tracker ___ ___ Python-bugs-list

[issue26260] utf8 decoding inconsistency between P2 and P3

2016-02-01 Thread Jim Jin
New submission from Jim Jin: PAYLOAD1 = b'\xce\xba\xe1\xbd\xb9\xcf\x83\xce\xbc\xce\xb5' PAYLOAD2 = b'\xed\xa0\x80' PAYLOAD3 = b'\x65\x64\x69\x74\x65\x64' PAYLOAD = PAYLOAD1 + PAYLOAD2 + PAYLOAD3 PAYLOAD.decode('utf8') passes in P2.7.* and fails in P3.4 Thank you for reading.