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 mitya57
Recipients barry, jeffknupp, mitya57, python-dev, r.david.murray
Date 2012-06-02.10:11:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1338631861.21.0.842007416767.issue14380@psf.upfronthosting.co.za>
In-reply-to
Content
Maybe it'll be better to use 'latin-1' charset for latin-1 texts?

Something like this:

if _charset == 'us-ascii':
    try:
        _text.encode(_charset)
    except UnicodeEncodeError:
        try:
            _text.encode('latin-1')
        except UnicodeEncodeError:
            _charset = 'utf-8'
        else:
            _charset = 'latin-1'

This will make messages in most latin languages use quoted-printable encoding.
History
Date User Action Args
2012-06-02 10:11:01mitya57setrecipients: + mitya57, barry, r.david.murray, python-dev, jeffknupp
2012-06-02 10:11:01mitya57setmessageid: <1338631861.21.0.842007416767.issue14380@psf.upfronthosting.co.za>
2012-06-02 10:11:00mitya57linkissue14380 messages
2012-06-02 10:11:00mitya57create