Follow-up from #2076505: Default encoding causing bad characters.

The new 'auto' value for mb_convert_encoding() results in UTF-8 mails being read properly, but now ISO-8859-1 isn't anymore, danish characters simply disappear.

I've attached a mail that should end in 3 danish characters.

CommentFileSizeAuthor
#2 mailhandler-2088149-2.patch2.38 KBDane Powell
iso-8859-1.txt1.23 KBXen
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dane Powell’s picture

It looks like we should try to extract the charset from the message and pass it as an argument to mb_convert_encoding().

Dane Powell’s picture

Version: 6.x-2.7 » 6.x-2.x-dev
Status: Active » Needs review
FileSize
2.38 KB

Can you try this patch and see if it works? You'll need to apply it against the latest dev release.

If it doesn't, and you have any coding skills, I'd appreciate if you could help debug- use a watchdog or mailhandler_report call to make sure $charset is getting set correctly, etc... Thanks!

Dane Powell’s picture

Title: ISO-8859-1 Mails not decoded properly anymore » ISO-8859-1 mails not decoded properly
Status: Needs review » Fixed
Xen’s picture

Sorry for the lack of response, DrupalCon got in the way.

I've just checked my mail and this patch seems to have fixed it OK.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.