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

encoding bug #5

Open
hadmut opened this issue Oct 12, 2015 · 0 comments
Open

encoding bug #5

hadmut opened this issue Oct 12, 2015 · 0 comments

Comments

@hadmut
Copy link

hadmut commented Oct 12, 2015

Hi,

I'm using the rfc2047 gem to parse mail headers read from an IMAP server. In rare cases the gem aborts with

Error incompatible character encodings: UTF-8 and ASCII-8BIT
Encoding::CompatibilityError
/var/lib/gems/2.1.0/gems/rfc2047-0.3/lib/rfc2047.rb:25:in gsub' /var/lib/gems/2.1.0/gems/rfc2047-0.3/lib/rfc2047.rb:25:indecode'

A parameter given to the rfc2047 decoder in this case was

"=?UTF-8?B?VW50ZXJzdMO8dHp1bmc=?=" <unterstü[email protected]>

which seems to be syntactically incorrect, since ü should have been rfc2047 encoded as well, but a decoder library should be able to deal with incorrect syntax, since this happens quite often, and not run into an encoding error.

regards
Hadmut

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