STINNER Victor added the comment:

I'm sorry, I don't understand this issue. Could you please elaborate the use 
case? Why do you want to support more error handlers? str.translate() calls 
_PyUnicode_TranslateCharmap() with errors="ignore", it's not possible to choose 
the error handler.

Many codecs are implemented in Python and some of them are implemented with 
"charmap". Does this issue enhance the codecs implemented with "charmap"?

"a\udc80".encode("latin9", "surrogatepass") raises UnicodeEncodeError with and 
without the patch, b"\x81".decode("cp1252", "surrogatepass") raises 
UnicodeDecodeError with and without the patch.

Hum, I'm not sure that codecs.charmap_build() is related str.translate().

----------
nosy: +haypo

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

Reply via email to