[issue23676] Add support of UnicodeTranslateError in standard error handlers
STINNER Victor
report at bugs.python.org
Thu Mar 26 22:52:05 CET 2015
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 <report at bugs.python.org>
<http://bugs.python.org/issue23676>
_______________________________________
More information about the Python-bugs-list
mailing list