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 serhiy.storchaka, vstinner, xiang.zhang
Date 2016-11-22.15:01:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1479826860.31.0.705777620798.issue28774@psf.upfronthosting.co.za>
In-reply-to
Content
If I understood correctly, the patch fix the ASCII encoder to handle correctly error handlers which return non-ASCII text replacement strings. Right?

I am not aware of such error handler, so I guess that it's a more a theorical fix?

I really hate the code (in each encoder) which handles non-ASCII replacement strings. The code in the charmap encoder is just a mess: it uses a reentrant call to the encoder... I never understood this crazy behaviour. I guess that nobody relies on the behaviour. I hesitate to simply raise an error instead of using different rules depending on the code. Ah yes, by the way, each codec behaves differently on non-ASCII replacement strings...
History
Date User Action Args
2016-11-22 15:01:00vstinnersetrecipients: + vstinner, serhiy.storchaka, xiang.zhang
2016-11-22 15:01:00vstinnersetmessageid: <1479826860.31.0.705777620798.issue28774@psf.upfronthosting.co.za>
2016-11-22 15:01:00vstinnerlinkissue28774 messages
2016-11-22 15:01:00vstinnercreate