Project

General

Profile

Actions

Defect #24992

open

MailHandler: an unexpected error occurred when receiving email: invalid byte sequence in UTF-8

Added by Deoren Moor about 7 years ago. Updated over 4 years ago.

Status:
Needs feedback
Priority:
Normal
Assignee:
-
Category:
Email receiving
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

Problem description

We have set RAILS_ENV to development for our email scraping, so we were fortunate enough to have this logged when we found that several emails had been rejected:

MailHandler: an unexpected error occurred when receiving email: invalid byte sequence in UTF-8
Message 190 can not be processed

The subject line of the email had this text:

Boletín de entomología venezolana.
Redmine installation info

# bin/about

Show

# bundle list

Show

I don't know what the fix actually is, but this Stackoverflow.com1 thread mentioned this:

The combination of using: @file = IO.read(file).force_encoding("ISO-8859-1").encode("utf-8", replace: nil) and #encoding: UTF-8 solved the issue.

I don't have Ruby knowledge, but I'll start digging through the code on my end to see if I can find where to make those changes. Please let me know if you need additional information.


1 http://stackoverflow.com/questions/9607554/ruby-invalid-byte-sequence-in-utf-8


Related issues

Related to Redmine - Feature #31921: Changes to properly support 4 byte characters (emoji) when database is MySQLClosedGo MAEDA

Actions
Has duplicate Redmine - Defect #27361: Failed when using EmojiClosed

Actions
Actions

Also available in: Atom PDF