Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encoding problem with iso-8859-1 #189

Open
mdjdev opened this issue Mar 3, 2017 · 2 comments
Open

Encoding problem with iso-8859-1 #189

mdjdev opened this issue Mar 3, 2017 · 2 comments

Comments

@mdjdev
Copy link

mdjdev commented Mar 3, 2017

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.

@tomsommer
Copy link
Contributor

tomsommer commented Apr 20, 2017

#173 might fix this

@Git-Elisha
Copy link

Nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants