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 serhiy.storchaka
Recipients ezio.melotti, methane, python-dev, r.david.murray, serhiy.storchaka, vstinner
Date 2015-09-24.13:11:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I worked on UTF-16 and UTF-32 encoders, but now I'm off my developing computer. I'll provide updated patch soon.

I think that only "surrogateescape" and "surrogatepass" error handlers have need in optimization, because they are used to interpolate with other programs, including old Python versions. "strict" stops processing, an optimization is not needed here. All other error handlers lose information and can't be used per se for transcoding bytes as string or string as bytes. They are used together with other slow code (for example for encoding string in XML or HTML you first need to escape '&', '<' and quotes). It is easy to add fast handling for 'ignore' and 'replace', but these error handlers are used largely for produce human-readable output, and adding it can slow down common case (no errors). That is why I limit my patch for "surrogateescape" and "surrogatepass" only.
Date User Action Args
2015-09-24 13:11:05serhiy.storchakasetrecipients: + serhiy.storchaka, vstinner, ezio.melotti, r.david.murray, methane, python-dev
2015-09-24 13:11:05serhiy.storchakasetmessageid: <>
2015-09-24 13:11:05serhiy.storchakalinkissue24870 messages
2015-09-24 13:11:04serhiy.storchakacreate