This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients doerwalter, lemburg, martin.panter, ncoghlan, serhiy.storchaka, vstinner
Date 2015-03-26.21:52:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1427406725.4.0.470899639319.issue23676@psf.upfronthosting.co.za>
In-reply-to
Content
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().
History
Date User Action Args
2015-03-26 21:52:05vstinnersetrecipients: + vstinner, lemburg, doerwalter, ncoghlan, martin.panter, serhiy.storchaka
2015-03-26 21:52:05vstinnersetmessageid: <1427406725.4.0.470899639319.issue23676@psf.upfronthosting.co.za>
2015-03-26 21:52:05vstinnerlinkissue23676 messages
2015-03-26 21:52:05vstinnercreate