Skip to content

encoding bug #5

@hadmut

Description

@hadmut

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ützung@mx2.websitesbyrich.com>

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions