diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-07-07 23:45:13 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-07-07 23:45:13 (GMT) |
commit | 2cded9c3f31d2fea4b033f44eaa828e508f03391 (patch) | |
tree | 1554d9f0baa575b7ae791ff1267c4e493a1b36bf /Lib/test/test_codecmaps_tw.py | |
parent | 081fe46ff96bccb1a256c356443b625b467814c8 (diff) | |
download | cpython-2cded9c3f31d2fea4b033f44eaa828e508f03391.zip cpython-2cded9c3f31d2fea4b033f44eaa828e508f03391.tar.gz cpython-2cded9c3f31d2fea4b033f44eaa828e508f03391.tar.bz2 |
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'.
Diffstat (limited to 'Lib/test/test_codecmaps_tw.py')
-rw-r--r-- | Lib/test/test_codecmaps_tw.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_codecmaps_tw.py b/Lib/test/test_codecmaps_tw.py index 6db5091..412b9de 100644 --- a/Lib/test/test_codecmaps_tw.py +++ b/Lib/test/test_codecmaps_tw.py @@ -23,6 +23,9 @@ class TestCP950Map(test_multibytecodec_support.TestBase_Mapping, (b'\xa2\xcc', '\u5341'), (b'\xa2\xce', '\u5345'), ] + codectests = ( + (b"\xFFxy", "replace", "\ufffdxy"), + ) def test_main(): support.run_unittest(__name__) |