[Python-checkins] r84750 - python/branches/py3k/Doc/whatsnew/3.2.rst

victor.stinner python-checkins at python.org
Sun Sep 12 22:32:57 CEST 2010


Author: victor.stinner
Date: Sun Sep 12 22:32:57 2010
New Revision: 84750

Log:
Document changes on mbcs encoding


Modified:
   python/branches/py3k/Doc/whatsnew/3.2.rst

Modified: python/branches/py3k/Doc/whatsnew/3.2.rst
==============================================================================
--- python/branches/py3k/Doc/whatsnew/3.2.rst	(original)
+++ python/branches/py3k/Doc/whatsnew/3.2.rst	Sun Sep 12 22:32:57 2010
@@ -544,3 +544,10 @@
   opaque C pointers in Python objects, the :ctype:`PyCapsule` API should be used
   instead; the new type has a well-defined interface for passing typing safety
   information and a less complicated signature for calling a destructor.
+
+* mbcs encoding doesn't ignore the error handler argument anymore. By default
+  (strict mode), it raises an UnicodeDecodeError on undecodable byte sequence
+  and UnicodeEncodeError on unencodable character. To get the mbcs encoding of
+  Python 3.1, use ``'ignore'`` error handler to decode and ``'replace'`` error
+  handler to encode. mbcs now supports ``'strict'`` and ``'ignore'`` error
+  handlers for decoding, and ``'strict'`` and ``'replace'`` for encoding.


More information about the Python-checkins mailing list