summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2009-05-02 18:52:14 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2009-05-02 18:52:14 (GMT)
commitdb12d454e6176e9c933babe3ce40b225307c6305 (patch)
tree28b09c64e9dfd797da58a98725bfb93b4dae7077 /Doc/library
parent02953d244fdb2fe99853d2fe5db905df53c6596f (diff)
downloadcpython-db12d454e6176e9c933babe3ce40b225307c6305.zip
cpython-db12d454e6176e9c933babe3ce40b225307c6305.tar.gz
cpython-db12d454e6176e9c933babe3ce40b225307c6305.tar.bz2
Issue #3672: Reject surrogates in utf-8 codec; add surrogates error
handler.
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/codecs.rst12
1 files changed, 12 insertions, 0 deletions
diff --git a/Doc/library/codecs.rst b/Doc/library/codecs.rst
index 4b6c7e5..ab578ea 100644
--- a/Doc/library/codecs.rst
+++ b/Doc/library/codecs.rst
@@ -323,6 +323,18 @@ and implemented by all standard Python codecs:
| | (only for encoding). |
+-------------------------+-----------------------------------------------+
+In addition, the following error handlers are specific to a single codec:
+
++------------------+---------+--------------------------------------------+
+| Value | Codec | Meaning |
++==================+=========+============================================+
+| ``'surrogates'`` | utf-8 | Allow encoding and decoding of surrogate |
+| | | codes in UTF-8. |
++------------------+---------+--------------------------------------------+
+
+.. versionadded:: 3.1
+ The ``'surrogates'`` error handler.
+
The set of allowed values can be extended via :meth:`register_error`.