diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-01-25 22:56:57 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-01-25 22:56:57 +0200 |
commit | f7b3d343578c306d612261a925e648edd60daee6 (patch) | |
tree | 82738b6ab1a3a9a1ff6562c25dcdb71b2736fdc9 /Doc/library/io.rst | |
parent | a539337592dcdb79a1f8ce6b5f275d584d22d677 (diff) | |
download | cpython-f7b3d343578c306d612261a925e648edd60daee6.tar.gz |
Issue #22286: The "backslashreplace" error handlers now works with
decoding and translating.
Diffstat (limited to 'Doc/library/io.rst')
-rw-r--r-- | Doc/library/io.rst | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Doc/library/io.rst b/Doc/library/io.rst index c77db90681..b0b1af3038 100644 --- a/Doc/library/io.rst +++ b/Doc/library/io.rst @@ -825,11 +825,12 @@ Text I/O exception if there is an encoding error (the default of ``None`` has the same effect), or pass ``'ignore'`` to ignore errors. (Note that ignoring encoding errors can lead to data loss.) ``'replace'`` causes a replacement marker - (such as ``'?'``) to be inserted where there is malformed data. When - writing, ``'xmlcharrefreplace'`` (replace with the appropriate XML character - reference), ``'backslashreplace'`` (replace with backslashed escape - sequences) or ``'namereplace'`` (replace with ``\N{...}`` escape sequences) - can be used. Any other error handling name that has been registered with + (such as ``'?'``) to be inserted where there is malformed data. + ``'backslashreplace'`` causes malformed data to be replaced by a + backslashed escape sequence. When writing, ``'xmlcharrefreplace'`` + (replace with the appropriate XML character reference) or ``'namereplace'`` + (replace with ``\N{...}`` escape sequences) can be used. Any other error + handling name that has been registered with :func:`codecs.register_error` is also valid. .. index:: |