I am working on a disposable mail service..
English works great always.. I fixed the encoding issues and now whenever a mail gets sent from a webmail service in whatever language it displays correct (used UTF-8 Encoding).
The only problem is that whenever a mail gets sent from MS Outlook , in languages other than english, it show weird headers:
Subject: Ù„ÙˆØØ© Ø§Ù„Ù…ÙØ§ØªÙŠØ العربية
OR
Subject: עכשיו לי ×–×” ×œ× ×¢×•×‘
The Message is displayed like this:
����� ����
I tried encoding this but it doesn't work. I'm sure it has something to do with MySQL because the webmail client displays it correctly.
Thank you
You might need to run the foreign text through something like php's htmlentities and htmlspecialchars to convert the accentuated and non-html characters to ascii html codes instead.
$subject = "especificações";
$subject = htmlspecialchars(htmlentities($subject), ENT_QUOTES, 'UTF-8');
var_dump($subject);
// returns string(36) "especificações"