]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Issue #12016: Multibyte CJK decoders now resynchronize faster
authorVictor Stinner <victor.stinner@haypocalc.com>
Thu, 7 Jul 2011 23:45:13 +0000 (01:45 +0200)
committerVictor Stinner <victor.stinner@haypocalc.com>
Thu, 7 Jul 2011 23:45:13 +0000 (01:45 +0200)
commit2cded9c3f31d2fea4b033f44eaa828e508f03391
tree1554d9f0baa575b7ae791ff1267c4e493a1b36bf
parent081fe46ff96bccb1a256c356443b625b467814c8
Issue #12016: Multibyte CJK decoders now resynchronize faster

They only ignore the first byte of an invalid byte sequence.

For example, b'\xff\n'.decode('gb2312', 'replace') gives '\ufffd\n' instead of
'\ufffd'.
13 files changed:
Doc/whatsnew/3.3.rst
Lib/test/test_codecencodings_cn.py
Lib/test/test_codecencodings_hk.py
Lib/test/test_codecencodings_jp.py
Lib/test/test_codecencodings_kr.py
Lib/test/test_codecencodings_tw.py
Lib/test/test_codecmaps_tw.py
Misc/NEWS
Modules/cjkcodecs/_codecs_cn.c
Modules/cjkcodecs/_codecs_hk.c
Modules/cjkcodecs/_codecs_jp.c
Modules/cjkcodecs/_codecs_kr.c
Modules/cjkcodecs/_codecs_tw.c