New submission from Ma Lin <malin...@163.com>:

Text descriptions about `Error Handlers` are not very friendly to novices.
https://docs.python.org/3/library/codecs.html#error-handlers

For example:

    'xmlcharrefreplace'
    Replace with the appropriate XML character reference (only for encoding).  
Implemented in :func:`xmlcharrefreplace_errors`. 

    'backslashreplace'
    Replace with backslashed escape sequences. Implemented in 
:func:`backslashreplace_errors`.

    'namereplace'
    Replace with ``\N{...}`` escape sequences (only for encoding).  Implemented 
in :func:`namereplace_errors`.

Novices may not know what these are.
Giving some examples may help the reader to understand more intuitively.
The effect picture is attached.

I picked two characters:
ß  https://www.compart.com/en/unicode/U+00DFhttps://www.compart.com/en/unicode/U+266C

----------
assignee: docs@python
components: Documentation
files: effect.png
messages: 351329
nosy: Ma Lin, docs@python
priority: normal
severity: normal
status: open
title: Add examples for common text encoding Error Handlers
versions: Python 3.7, Python 3.8, Python 3.9
Added file: https://bugs.python.org/file48599/effect.png

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38056>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to