# HG changeset patch # Parent 4d00d01091476644712193518d5fb46384df55d4 diff -r 4d00d0109147 -r ccf8c2c28ef6 Doc/library/codecs.rst --- a/Doc/library/codecs.rst Wed Jan 07 00:37:01 2015 +1000 +++ b/Doc/library/codecs.rst Tue Jan 06 21:53:21 2015 +0000 @@ -256,7 +256,6 @@ encodings. -.. _surrogateescape: .. _codec-base-classes: Codec Base Classes @@ -273,6 +272,7 @@ codec will handle encoding and decoding errors. +.. _surrogateescape: .. _error-handlers: Error Handlers @@ -319,7 +319,8 @@ | | :func:`backslashreplace_errors`. | +-------------------------+-----------------------------------------------+ | ``'namereplace'`` | Replace with ``\N{...}`` escape sequences | -| | (only for encoding). | +| | (only for encoding). Implemented in | +| | :func:`namereplace_errors`. | +-------------------------+-----------------------------------------------+ | ``'surrogateescape'`` | On decoding, replace byte with individual | | | surrogate code ranging from ``U+DC80`` to | @@ -422,7 +423,8 @@ .. function:: namereplace_errors(exception) - Implements the ``namereplace`` error handling (for encoding only): the + Implements the ``'namereplace'`` error handling (for encoding with + :term:`text encodings ` only): the unencodable character is replaced by a ``\N{...}`` escape sequence. .. versionadded:: 3.5