Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#2 | mailhandler-2088149-2.patch | 2.38 KB | Dane Powell |
iso-8859-1.txt | 1.23 KB | Xen |
Comments
Comment #1
Dane Powell CreditAttribution: Dane Powell commentedIt looks like we should try to extract the charset from the message and pass it as an argument to mb_convert_encoding().
Comment #2
Dane Powell CreditAttribution: Dane Powell commentedCan 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!
Comment #3
Dane Powell CreditAttribution: Dane Powell commentedhttp://drupalcode.org/project/mailhandler.git/commit/21a30ec
http://drupalcode.org/project/mailhandler.git/commit/73adcff
Comment #4
Xen CreditAttribution: Xen commentedSorry 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.