summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-07-07 23:45:13 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-07-07 23:45:13 (GMT)
commit2cded9c3f31d2fea4b033f44eaa828e508f03391 (patch)
tree1554d9f0baa575b7ae791ff1267c4e493a1b36bf /Doc
parent081fe46ff96bccb1a256c356443b625b467814c8 (diff)
downloadcpython-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 'Doc')
-rw-r--r--Doc/whatsnew/3.3.rst23
1 files changed, 23 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.3.rst b/Doc/whatsnew/3.3.rst
index e5e1805..990085e 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
------------