diff options
| author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-07-08 01:45:13 +0200 |
|---|---|---|
| committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-07-08 01:45:13 +0200 |
| commit | 1a877306523645659e522fff951978fdc9cc1896 (patch) | |
| tree | df67b84f971cb72d147f4fbb8c86fd8ab1b8f096 /Doc | |
| parent | 10a907bab0d4ff155169f1a397043f55510c1e60 (diff) | |
| download | cpython-1a877306523645659e522fff951978fdc9cc1896.tar.gz | |
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 'Doc')
| -rw-r--r-- | Doc/whatsnew/3.3.rst | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.3.rst b/Doc/whatsnew/3.3.rst index e5e18051a5..990085e0f0 100644 --- a/Doc/whatsnew/3.3.rst +++ b/Doc/whatsnew/3.3.rst @@ -68,6 +68,29 @@ New, Improved, and Deprecated Modules * Stub +codecs +------ + +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 '�\n' instead of '�'. + +(http://bugs.python.org/issue12016) + +Don't reset incremental encoders of CJK codecs at each call to their encode() +method anymore. For example: :: + + $ ./python -q + >>> import codecs + >>> encoder = codecs.getincrementalencoder('hz')('strict') + >>> b''.join(encoder.encode(x) for x in '\u52ff\u65bd\u65bc\u4eba\u3002 Bye.') + b'~{NpJ)l6HK!#~} Bye.' + +This example gives b'~{Np~}~{J)~}~{l6~}~{HK~}~{!#~} Bye.' with older Python +versions. + +(http://bugs.python.org/issue12100) + faulthandler ------------ |
