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

Mail.new() crashes with error: invalid byte sequence in UTF-8 #1634

Open
Chris78 opened this issue Feb 21, 2025 · 0 comments
Open

Mail.new() crashes with error: invalid byte sequence in UTF-8 #1634

Chris78 opened this issue Feb 21, 2025 · 0 comments

Comments

@Chris78
Copy link

Chris78 commented Feb 21, 2025

The crash happens on line 2015 of mail Gem, version 2.8.1:

    def set_envelope_header
      raw_string = raw_source.to_s
      if match_data = raw_string.match(/\AFrom\s+([^:\s]#{Constants::TEXT}*)#{Constants::LAX_CRLF}/m)

To me it looks like the encoding

Content-Type: text/plain; charset=WINDOWS-1252
Content-Transfer-Encoding: 7bit

might be responsible along with a special apostrophe character in:
haven’t

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

No branches or pull requests

1 participant