Issue #3672: Reject surrogates in utf-8 codec; add surrogates error
handler.
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 @@
| | (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`.