Fetch icon indicating copy to clipboard operation
Fetch copied to clipboard

Encoding problem with iso-8859-1

Open mdjdev opened this issue 7 years ago • 2 comments

Hello,

I have noticed an issue when an email is encoded in iso-8859-1 (structure encoding = 4). Special characters are shown as '?'. I'm new to programming and don't know how pull request work, but I found a working solution (at least for my case).

In Message.php on line 527 I added the elseif-branch: if ($structure->encoding === 0) { $parameters['charset'] = 'US-ASCII';
} elseif($structure->encoding === 4) { $parameters['charset'] = 'ISO-8859-1'; } else { $parameters['charset'] = 'UTF-8'; }

Otherwise mb_convert_encoding is failing because $from_encoding is passed as 'UTF-8' even if it's not true.

Could someone with more knowledge look into this? Thanks a lot.

mdjdev avatar Mar 03 '17 08:03 mdjdev

#173 might fix this

tomsommer avatar Apr 20 '17 18:04 tomsommer

Nice

Git-Elisha avatar Jan 27 '23 15:01 Git-Elisha