github joeyates/imap-backup v11.1.0
Improve Handling of Badly Encoded Messages

latest releases: v15.0.2, v15.0.1, v14.6.1...
12 months ago

We now force the body encoding to UTF-8

With badly encoded message, an error was being thrown:

    Encoding::CompatibilityError: incompatible character encodings: UTF-8
    and ASCII-8BIT

The problem occurred when:

  1. The server returned a badly encoded email message,
  2. there were non-ASCII characters in the 'From' line
  3. there were non-ASCII characters in other parts of the message.

In this case, the 'mail' gem force encoded the 'From' line as UTF-8,
but the body was still be "ASCII-8BIT". Without non-ASCII characters,
the 'From' line got coerced to the same encoding as the body,
but when both parts had non-ASCII characters, the error was thrown.

Now, we force the body to UTF-8 before uniting it tieh the 'From' line.

Don't miss a new imap-backup release

NewReleases is sending notifications on new releases.