Skip to content
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

Handle incomptible encodings in email headers #1375

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bobjflong
Copy link

Previously, running this new test case would throw an Encoding::CompatibilityError error, as it attempts to join the parsed ASCII-8BIT string and parsed UTF-8 string together.

Now, if a set of incompatible encodings is detected, we first force the strings to be UTF-8, and replace invalid characters.

Let me know if there are other thoughts on how to handle this error.

@sakirtemel
Copy link

any updates here? and what should be the correct behaviour? I'm running similar issue with message-id header

@mikel
Copy link
Owner

mikel commented Dec 3, 2022

@bobjflong thanks for this. Wondering what real world case would exist where you are inserting incompatible strings? Would we get this from an incoming email or is this only really possible when you are using mail in a program you control?

@mikel
Copy link
Owner

mikel commented Dec 3, 2022

cc @sakirtemel

@mikel mikel added this to the 2.9.0 milestone Dec 3, 2022
@sakirtemel
Copy link

@mikel as far as I remember it was happening when we were receiving an incoming email for our case. I've seen many of those happening and they were failing in our queues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants