I have tested PHP’s IMAP lib. to fetch emails from a GMAIL account, but I’ve just can’t get my head around trying to make the characters to display correctly.
At first, I was close to pull my hair off when I realized that I accidentally fetched the attachments instead of the message body – not good, but now when that is solved, I still have problems viewing the actual messages with appropriate Swedish characters, like åÅ äÄ öÖ which instead appear as their ASCII-cousins; =E4, =E5 – and so on.
What is the appropriate way to solve this? I’ve tested all encoding functions that I can think of by myself – and it won’t work…
Thanks!
Not 100% sure, but it seems to me that the content of the message is quoted-printable encoded. Try
quoted_printable_decode– http://www.php.net/manual/en/function.quoted-printable-decode.phpIf you are already using the IMAP extension, you can also try
imap_qprint– http://www.php.net/manual/en/function.imap-qprint.php