-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
gh-105285: Use UTF-8 on email content when CTE is '8bit' #105306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
When getting the payload of an email using email.message.Message.get_payload() and passing decode=True, attempt to use UTF-8 if the Content-Transfer-Encoding header is '8bit'.
Just came back to check on this, and it seems the documentation preview check hasn't passed even though there is no documentation to be built. I don't believe this change would require any documentation changes, as it's a bug fix. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UTF-8 is not always the right encoding. It should be self.get_param('charset', 'ascii')
.
hey @michaelfm1211 @serhiy-storchaka, |
Hi, news on this? I'm currently facing the same problem and the fix seems to work. |
@lorenzomorandini Sorry, I kind of just forgot about this PR a few months ago when I was busy with work. I'll try to address the review today. |
The following commit authors need to sign the Contributor License Agreement: |
When getting the payload of an email using
email.message.Message.get_payload() and passing decode=True, attempt to use UTF-8 if the Content-Transfer-Encoding header is '8bit'.