Hi, I want to endocde these characters into normal UTF8 characters: This: Buradan saytınızda mÉ™qalÉ™, sÉ™hifÉ™ vÉ™ ya hÉ™r hansı materialÉ™niza yazılan ÅŸÉ™rhlÉ™ri idarÉ™ edÉ™ bilÉ™rsiniz Code (markup): Have to be converted to: Buradan saytınızda məqalə, səhifə və ya hər hansı materialıniza yazılan şərhləri idarə edə bilərsiniz Code (markup): Please let me know how to convert first to second, i have manually converted second line but you have to give me code this will translate these umlauts. Thanks,
Try iconv Knowledge base: http://en.wikipedia.org/wiki/Iconv example usage: <?php $data = "Buradan saytınızda mÉ™qalÉ™, sÉ™hifÉ™ vÉ™ ya hÉ™r hansı materialÉ™niza yazılan ÅŸÉ™rhlÉ™ri idarÉ™ edÉ™ bilÉ™rsiniz"; ##$convert = iconv("UTF-8", "ISO-8859-1//IGNORE", $data); umlauts render failure $convert = iconv("UTF-8", "UTF-8//TRANSLIT", $data); #fixed (works with //IGNORE on Xampp as well) echo $convert; //returns Buradan saytınızda məqalə, səhifə və ya hər hansı materialəniza yazılan şərhləri idarə edə bilərsiniz ?> PHP: -edit- fixed translate issue with 'ə' you might want to play around with conversion to render appropriate char (given Azerbaijani language Cyrillic and Latin mix: iso-8859-5 Windows-1251 & iso-8859-9 Windows-1254) on production server since I tested this in windows environment only. another method using convmap (below): $data = "Buradan saytınızda mÉ™qalÉ™, sÉ™hifÉ™ vÉ™ ya hÉ™r hansı materialÉ™niza yazılan ÅŸÉ™rhlÉ™ri idarÉ™ edÉ™ bilÉ™rsiniz"; echo mb_encode_numericentity($data, array(0x0, 0xffff, 0, 0xffff), 'UTF-8'); PHP: ROOFIS
Hmm I will try this method, but i have also created such thing: $tsan = array("ÄŸ","ç","ü","É™","ÅŸ","ö","ı","Åž","Ü","ÆÂ","Ç","Ö","Äž"); $tnan = array("ÄŸ","ç","ü","É™","ÅŸ","ö","ı","Åž","Ü","Æ","Ç","Ö","Äž"); $cont = str_replace($tsan, $tnan, $data); PHP: Sure this is not complete characters, but works OK for Azerbaijani language. Thanks for information