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 aepsil0n
Recipients aepsil0n, barry, r.david.murray
Date 2020-04-02.13:52:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1585835529.27.0.884427076581.issue40157@roundup.psfhosted.org>
In-reply-to
Content
Using email.policy.SMTP a message's non-ASCII characters are not encoded. The policy.utf8 attribute is set to False as documented.

The attached script illustrates the behaviour. I get the following command line output from it:

Subject: =?utf-8?b?w7zDtsOk?=


False
Subject: üöä


True
Subject: üöä


The default compat32 policy encodes the string, but the SMTP policy does not encode it, but leaves it as UTF-8 despite policy.utf8 == False. I might be misreading the documentation here, but it seems to me like utf8 == False implies that encoding should happen.
History
Date User Action Args
2020-04-02 13:52:09aepsil0nsetrecipients: + aepsil0n, barry, r.david.murray
2020-04-02 13:52:09aepsil0nsetmessageid: <1585835529.27.0.884427076581.issue40157@roundup.psfhosted.org>
2020-04-02 13:52:09aepsil0nlinkissue40157 messages
2020-04-02 13:52:09aepsil0ncreate