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 msapiro
Recipients barry, msapiro, r.david.murray
Date 2017-12-15.03:23:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1513308207.85.0.213398074469.issue32330@psf.upfronthosting.co.za>
In-reply-to
Content
Yes. I think errors=replace is a good solution. In Mailman, we have our own mailman.email.message.Message class which is a subclass of email.message.Message and what we do to work around this and issue27321 is override as_string() with:

    def as_string(self):
        # Work around for https://bugs.python.org/issue27321 and
        # https://bugs.python.org/issue32330.
        try:
            value = email.message.Message.as_string(self)
        except (KeyError, UnicodeEncodeError):
            value = email.message.Message.as_bytes(self).decode(
                'ascii', 'replace')
        return value
History
Date User Action Args
2017-12-15 03:23:27msapirosetrecipients: + msapiro, barry, r.david.murray
2017-12-15 03:23:27msapirosetmessageid: <1513308207.85.0.213398074469.issue32330@psf.upfronthosting.co.za>
2017-12-15 03:23:27msapirolinkissue32330 messages
2017-12-15 03:23:27msapirocreate