crashmaster Posted January 14, 2008 Share Posted January 14, 2008 HI there, I ahve a script...INDEX.PHP (for ex.) ... It have an JS fnction to do an AJAX request. Than I have executive script: sendMail.php This script simply sends mail with values from INDEX>php .. But the problem is that I live in Czech republic and there are some special letters... (For ex. : č ř ž ý) .. When the mail send, this letters are transformed into UTF-8 and in the end I recive mail with: "Já bych si chtÄ›l pĹ™ivydÄ›lat :-P o co de..? " instead of right form : "Já bych si chtěl přivydělat :-P o co de..? " I need a script which will transform this special chars into this-> š or Ŏ (btw: I have a table where every Czech Special Letter has its own "code" (for.ex: š -> š) ) Can somebody help me ? Quote Link to comment Share on other sites More sharing options...
nogray Posted January 14, 2008 Share Posted January 14, 2008 You'll need to use UTF-8 encoding in your PHP mail function $headers .= 'Content-type: text/html; charset=utf-8' . "\r\n"; or use htmlentities() php function Quote Link to comment Share on other sites More sharing options...
crashmaster Posted January 14, 2008 Author Share Posted January 14, 2008 but sendMail.php is getting already transformed (encrypted data)... PHP already has "á" but not "á"..I suppose this will not help/// Quote Link to comment Share on other sites More sharing options...
nogray Posted January 18, 2008 Share Posted January 18, 2008 Make sure you HTML page is encoded using UTF as well, add this to the head tag <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.