Fetch
Fetch copied to clipboard
Encoding problem with iso-8859-1
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.
#173 might fix this
Nice