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 ncoghlan
Recipients ncoghlan
Date 2014-07-20.11:19:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1405855154.64.0.953436457536.issue22016@psf.upfronthosting.co.za>
In-reply-to
Content
This would be along the same lines as xmlcharrefreplace and backslashreplace, but only affect surrogate escaped characters.

Unlike surrogate escape, which reproduces the escaped characters directly in the data stream, this would follow the 'replace' error handler and insert an appropriately encoded '?' character in the output stream.

The use case would be any context where losing the escaped characters is preferred to either potentially injecting arbitrary binary data into the output (surrogateescape), failing with an exception (strict), or any of the other existing codecs.

It would differ from 'replace' in that normal code points that can't be encoded at all would still trigger an error.
History
Date User Action Args
2014-07-20 11:19:14ncoghlansetrecipients: + ncoghlan
2014-07-20 11:19:14ncoghlansetmessageid: <1405855154.64.0.953436457536.issue22016@psf.upfronthosting.co.za>
2014-07-20 11:19:14ncoghlanlinkissue22016 messages
2014-07-20 11:19:14ncoghlancreate