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 Arfrever, ncoghlan, r.david.murray, serhiy.storchaka
Date 2013-08-23.11:55:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1377258916.29.0.903757661508.issue18814@psf.upfronthosting.co.za>
In-reply-to
Content
These functions are trivial.

    def has_escaped_bytes(s):
        try:
            s.encode()
            return False
        except UnicodeEncodeError:
            return True

    def replace_escaped_bytes(s):
        return s.encode('utf-8', 'replace').decode()
History
Date User Action Args
2013-08-23 11:55:16serhiy.storchakasetrecipients: + serhiy.storchaka, ncoghlan, Arfrever, r.david.murray
2013-08-23 11:55:16serhiy.storchakasetmessageid: <1377258916.29.0.903757661508.issue18814@psf.upfronthosting.co.za>
2013-08-23 11:55:16serhiy.storchakalinkissue18814 messages
2013-08-23 11:55:16serhiy.storchakacreate