I have a php form which submits information to an email. Everything works fine when dealing with 'normal' text. However, if a user submits "العربية", the resulting text displays as "د لله ". The website is in 3 languages (EN, FR, AR). Page encoding is unicode... Clearly it is an encoding problem, but I have looked around and cannot really see where to start to fix the problem. My php form submits to an external php file(contactus.php attached ), which in turn checks configuration information on an external text file.
Firstly, let me get this off my chest: bumping posts is rude at the best of times, but when the only posts that you have ever made on the forum consist of your one post plus 4 bumps, that's just extremely rude. ESPECIALLY when your first bump was only 3 hours after the post. I was 'this close' to not replying, just for that. Anyway, essentially your problem is that the mail function doesn't do unicode. It seems as though email itself doesn't do unicode: it all comes down to ASCII and if you need to send unicode characters then it needs to be encoded. That's the feeling I get, anyway. I've never done anything like this before, but in the 2 minutes that it took me to Google 'sending unicode email via php' and looking through a few pages, I came across the following links that may help: - http://www.advogato.org/article/812.html - http://www.php.net/manual/en/function.mb-send-mail.php#29843 - http://www.php.net/mb_send_mail Hope that helps.
i think simple header() will solve your problem... use it like this, at the start of the page script: <? ... header('Content-Type: text/html; charset=utf-8'); ... ?> of course replace utf-8 charset with your own used one...
Unless I'm mistaken, the problem is with bad characters in the emails, not the web page itself. If I'm right, the header function will have no effect. Can the OP confirm or deny this problem, please?