mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Describe 'surrogateescape' in the documentation.
Also, improve some docstring descriptions of the 'errors' parameter. Closes #14015.
This commit is contained in:
parent
893f2ffc7c
commit
c7b6c50f29
5 changed files with 41 additions and 15 deletions
|
@ -78,7 +78,11 @@ It defines the following functions:
|
|||
reference (for encoding only)
|
||||
* ``'backslashreplace'``: replace with backslashed escape sequences (for
|
||||
encoding only)
|
||||
* ``'surrogateescape'``: replace with surrogate U+DCxx, see :pep:`383`
|
||||
* ``'surrogateescape'``: on decoding, replace with code points in the Unicode
|
||||
Private Use Area ranging from U+DC80 to U+DCFF. These private code
|
||||
points will then be turned back into the same bytes when the
|
||||
``surrogateescape`` error handler is used when encoding the data.
|
||||
(See :pep:`383` for more.)
|
||||
|
||||
as well as any other error handling name defined via :func:`register_error`.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue