tedious / Fetch

An IMAP library for PHP
http://www.tedivm.com
Other
502 stars 160 forks source link

Encoding lower/uppercase #148

Open dratel29 opened 9 years ago

dratel29 commented 9 years ago

Some mail clients report the encoding in lowercase ('koi8-r' for Yandex.ru, for instance). This causes an error in Message::processStructure since it appears in uppercase in mb_list_encodings(). The resulting fallback to UTF-8 makes the final message unreadable.

I suggest testing for both lower and uppercase versions of the encoding's name, because mb_convert_encoding seems perfectly fine with both versions.

linniksa commented 9 years ago

@dratel29 can you test with https://github.com/linniksa/Fetch/commits/patch-generalize-charset-convert ?

klammbueddel commented 9 years ago

+1 on this. Just run into the same issue, where a client sends iso-8859-1 as charset. I like the solution from @linniksa.

adriansuter commented 8 years ago

+1. Please merge that commit from @linniksa.

wiiiteek commented 8 years ago

+1 on this. Same issue here. @tedivm please merge commit from @linniksa

tomsommer commented 7 years ago

173 fixes this