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 r.david.murray
Recipients Arfrever, ezio.melotti, ncoghlan, pitrou, r.david.murray, serhiy.storchaka, vstinner
Date 2013-08-23.23:28:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The email package uses surrogateescape to store unknown bytes in unicode strings, just as with the handle-bad-data-from-os API surrogateescape was introduced for.  (For the same reason: the source data may have improperly encoded bytes that we must nevertheless preserve).  What action certain parts of the code takes differs depending on whether or not there are such encoded bytes in the string.  So the code needs to check and branch based on that.

The utility function is email.utils._has_surrogates.  You can grep the email source to see where it is used, if you like.
Date User Action Args
2013-08-23 23:28:45r.david.murraysetrecipients: + r.david.murray, ncoghlan, pitrou, vstinner, ezio.melotti, Arfrever, serhiy.storchaka
2013-08-23 23:28:45r.david.murraysetmessageid: <>
2013-08-23 23:28:45r.david.murraylinkissue18814 messages
2013-08-23 23:28:45r.david.murraycreate