//include("process/required.php"); function correctEncoding($text) { // general characters first $text = str_replace("", "‘", $text); // LEFT SINGLE QUOTATION MARK $text = str_replace("", "’", $text); // RIGHT SINGLE QUOTATION MARK $text = str_replace("", "“", $text); // LEFT DOUBLE QUOTATION MARK $text = str_replace("", "”", $text); //RIGHT DOUBLE QUOTATION MARK $text = str_replace("", "·", $text); //BULLET // thai characters $text = str_replace("¡", "¡", $text); // 3585 THAI CHARACTER KO KAI $text = str_replace("¢", "¢", $text); // 3586 THAI CHARACTER KHO KHAI $text = str_replace("£", "£", $text); // 3587 THAI CHARACTER KHO KHUAT $text = str_replace("¤", "¤", $text); // 3588 THAI CHARACTER KHO KHWAI $text = str_replace("¥", "¥", $text); // 3589 THAI CHARACTER KHO KHON $text = str_replace("¦", "¦", $text); // 3590 THAI CHARACTER KHO RAKHANG $text = str_replace("§", "§", $text); // 3591 THAI CHARACTER NGO NGU $text = str_replace("¨", "¨", $text); // 3592 THAI CHARACTER CHO CHAN $text = str_replace("©", "©", $text); // 3593 THAI CHARACTER CHO CHING $text = str_replace("ª", "ª", $text); // 3594 THAI CHARACTER CHO CHANG $text = str_replace("«", "«", $text); // 3595 THAI CHARACTER SO SO $text = str_replace("¬", "¬", $text); // 3596 THAI CHARACTER CHO CHOE $text = str_replace("", "", $text); // 3597 THAI CHARACTER YO YING $text = str_replace("®", "®", $text); // 3598 THAI CHARACTER DO CHADA $text = str_replace("¯", "¯", $text); // 3599 THAI CHARACTER TO PATAK $text = str_replace("°", "°", $text); // 3600 THAI CHARACTER THO THAN $text = str_replace("±", "±", $text); // 3601 THAI CHARACTER THO NANGMONTHO $text = str_replace("²", "²", $text); // 3602 THAI CHARACTER THO PHUTHAO $text = str_replace("³", "³", $text); // 3603 THAI CHARACTER NO NEN $text = str_replace("´", "´", $text); // 3604 THAI CHARACTER DO DEK $text = str_replace("µ", "µ", $text); // 3605 THAI CHARACTER TO TAO $text = str_replace("¶", "¶", $text); // 3606 THAI CHARACTER THO THUNG $text = str_replace("·", "·", $text); // 3607 THAI CHARACTER THO THAHAN $text = str_replace("¸", "¸", $text); // 3608 THAI CHARACTER THO THONG $text = str_replace("¹", "¹", $text); // 3609 THAI CHARACTER NO NU $text = str_replace("º", "º", $text); // 3610 THAI CHARACTER BO BAIMAI $text = str_replace("»", "»", $text); // 3611 THAI CHARACTER PO PLA $text = str_replace("¼", "¼", $text); // 3612 THAI CHARACTER PHO PHUNG $text = str_replace("½", "½", $text); // 3613 THAI CHARACTER FO FA $text = str_replace("¾", "¾", $text); // 3614 THAI CHARACTER PHO PHAN $text = str_replace("¿", "¿", $text); // 3615 THAI CHARACTER FO FAN $text = str_replace("À", "À", $text); // 3616 THAI CHARACTER PHO SAMPHAO $text = str_replace("Á", "Á", $text); // 3617 THAI CHARACTER MO MA $text = str_replace("Â", "Â", $text); // 3618 THAI CHARACTER YO YAK $text = str_replace("Ã", "Ã", $text); // 3619 THAI CHARACTER RO RUA $text = str_replace("Ä", "Ä", $text); // 3620 THAI CHARACTER RU $text = str_replace("Å", "Å", $text); // 3621 THAI CHARACTER LO LING $text = str_replace("Æ", "Æ", $text); // 3622 THAI CHARACTER LU $text = str_replace("Ç", "Ç", $text); // 3623 THAI CHARACTER WO WAEN $text = str_replace("È", "È", $text); // 3624 THAI CHARACTER SO SALA $text = str_replace("É", "É", $text); // 3625 THAI CHARACTER SO RUSI $text = str_replace("Ê", "Ê", $text); // 3626 THAI CHARACTER SO SUA $text = str_replace("Ë", "Ë", $text); // 3627 THAI CHARACTER HO HIP $text = str_replace("Ì", "Ì", $text); // 3628 THAI CHARACTER LO CHULA $text = str_replace("Í", "Í", $text); // 3629 THAI CHARACTER O ANG $text = str_replace("Î", "Î", $text); // 3630 THAI CHARACTER HO NOKHUK $text = str_replace("Ï", "Ï", $text); // 3631 THAI CHARACTER PAIYANNOI $text = str_replace("Ð", "Ð", $text); // 3632 THAI CHARACTER SARA A $text = str_replace("Ñ", "Ñ", $text); // 3633 THAI CHARACTER MAI HAN-AKAT $text = str_replace("Ò", "Ò", $text); // 3634 THAI CHARACTER SARA AA $text = str_replace("Ó", "Ó", $text); // 3635 THAI CHARACTER SARA AM $text = str_replace("Ô", "Ô", $text); // 3636 THAI CHARACTER SARA I $text = str_replace("Õ", "Õ", $text); // 3637 THAI CHARACTER SARA II $text = str_replace("Ö", "Ö", $text); // 3638 THAI CHARACTER SARA UE $text = str_replace("×", "×", $text); // 3639 THAI CHARACTER SARA UEE $text = str_replace("Ø", "Ø", $text); // 3640 THAI CHARACTER SARA U $text = str_replace("Ù", "Ù", $text); // 3641 THAI CHARACTER SARA UU $text = str_replace("Ú", "Ú", $text); // 3642 THAI CHARACTER PHINTHU $text = str_replace("ß", "ß", $text); // 3647 THAI CURRENCY SYMBOL BAHT $text = str_replace("à", "à", $text); // 3648 THAI CHARACTER SARA E $text = str_replace("á", "á", $text); // 3649 THAI CHARACTER SARA AE $text = str_replace("â", "â", $text); // 3650 THAI CHARACTER SARA O $text = str_replace("ã", "ã", $text); // 3651 THAI CHARACTER SARA AI MAIMUAN $text = str_replace("ä", "ä", $text); // 3652 THAI CHARACTER SARA AI MAIMALAI $text = str_replace("å", "å", $text); // 3653 THAI CHARACTER LAKKHANGYAO $text = str_replace("æ", "æ", $text); // 3654 THAI CHARACTER MAIYAMOK $text = str_replace("ç", "ç", $text); // 3655 THAI CHARACTER MAITAIKHU $text = str_replace("è", "è", $text); // 3656 THAI CHARACTER MAI EK $text = str_replace("é", "é", $text); // 3657 THAI CHARACTER MAI THO $text = str_replace("ê", "ê", $text); // 3658 THAI CHARACTER MAI TRI $text = str_replace("ë", "ë", $text); // 3659 THAI CHARACTER MAI CHATTAWA $text = str_replace("ì", "ì", $text); // 3660 THAI CHARACTER THANTHAKHAT $text = str_replace("í", "í", $text); // 3661 THAI CHARACTER NIKHAHIT $text = str_replace("î", "î", $text); // 3662 THAI CHARACTER YAMAKKAN $text = str_replace("ï", "ï", $text); // 3663 THAI CHARACTER FONGMAN $text = str_replace("ð", "ð", $text); // 3664 THAI DIGIT ZERO $text = str_replace("ñ", "ñ", $text); // 3665 THAI DIGIT ONE $text = str_replace("ò", "ò", $text); // 3666 THAI DIGIT TWO $text = str_replace("ó", "ó", $text); // 3667 THAI DIGIT THREE $text = str_replace("ô", "ô", $text); // 3668 THAI DIGIT FOUR $text = str_replace("õ", "õ", $text); // 3669 THAI DIGIT FIVE $text = str_replace("ö", "ö", $text); // 3670 THAI DIGIT SIX $text = str_replace("÷", "÷", $text); // 3671 THAI DIGIT SEVEN $text = str_replace("ø", "ø", $text); // 3672 THAI DIGIT EIGHT $text = str_replace("ù", "ù", $text); // 3673 THAI DIGIT NINE $text = str_replace("ú", "ú", $text); // 3674 THAI CHARACTER ANGKHANKHU $text = str_replace("û", "û", $text); // 3675 THAI CHARACTER KHOMUT // convert unicode hex representations to win-874 $text = str_replace("\xE0\xB8\x81", "¡", $text); // 3585 THaI cHaRacTeR KO KaI $text = str_replace("\xE0\xB8\x82", "¢", $text); // 3586 THaI cHaRacTeR KHO KHaI $text = str_replace("\xE0\xB8\x83", "£", $text); // 3587 THaI cHaRacTeR KHO KHUaT $text = str_replace("\xE0\xB8\x84", "¤", $text); // 3588 THaI cHaRacTeR KHO KHWaI $text = str_replace("\xE0\xB8\x85", "¥", $text); // 3589 THaI cHaRacTeR KHO KHON $text = str_replace("\xE0\xB8\x86", "¦", $text); // 3590 THaI cHaRacTeR KHO RaKHaNG $text = str_replace("\xE0\xB8\x87", "§", $text); // 3591 THaI cHaRacTeR NGO NGU $text = str_replace("\xE0\xB8\x88", "¨", $text); // 3592 THaI cHaRacTeR cHO cHaN $text = str_replace("\xE0\xB8\x89", "©", $text); // 3593 THaI cHaRacTeR cHO cHING $text = str_replace("\xE0\xB8\x8A", "ª", $text); // 3594 THaI cHaRacTeR cHO cHaNG $text = str_replace("\xE0\xB8\x8B", "«", $text); // 3595 THaI cHaRacTeR SO SO $text = str_replace("\xE0\xB8\x8C", "¬", $text); // 3596 THaI cHaRacTeR cHO cHOe $text = str_replace("\xE0\xB8\x8D", "", $text); // 3597 THaI cHaRacTeR YO YING $text = str_replace("\xE0\xB8\x8E", "®", $text); // 3598 THaI cHaRacTeR dO cHada $text = str_replace("\xE0\xB8\x8F", "¯", $text); // 3599 THaI cHaRacTeR TO PaTaK $text = str_replace("\xE0\xB8\x90", "°", $text); // 3600 THaI cHaRacTeR THO THaN $text = str_replace("\xE0\xB8\x91", "±", $text); // 3601 THaI cHaRacTeR THO NaNGMONTHO $text = str_replace("\xE0\xB8\x92", "²", $text); // 3602 THaI cHaRacTeR THO PHUTHaO $text = str_replace("\xE0\xB8\x93", "³", $text); // 3603 THaI cHaRacTeR NO NeN $text = str_replace("\xE0\xB8\x94", "´", $text); // 3604 THaI cHaRacTeR dO deK $text = str_replace("\xE0\xB8\x95", "µ", $text); // 3605 THaI cHaRacTeR TO TaO $text = str_replace("\xE0\xB8\x96", "¶", $text); // 3606 THaI cHaRacTeR THO THUNG $text = str_replace("\xE0\xB8\x97", "·", $text); // 3607 THaI cHaRacTeR THO THaHaN $text = str_replace("\xE0\xB8\x98", "¸", $text); // 3608 THaI cHaRacTeR THO THONG $text = str_replace("\xE0\xB8\x99", "¹", $text); // 3609 THaI cHaRacTeR NO NU $text = str_replace("\xE0\xB8\x9A", "º", $text); // 3610 THaI cHaRacTeR bO baIMaI $text = str_replace("\xE0\xB8\x9B", "»", $text); // 3611 THaI cHaRacTeR PO PLa $text = str_replace("\xE0\xB8\x9C", "¼", $text); // 3612 THaI cHaRacTeR PHO PHUNG $text = str_replace("\xE0\xB8\x9D", "½", $text); // 3613 THaI cHaRacTeR fO fa $text = str_replace("\xE0\xB8\x9E", "¾", $text); // 3614 THaI cHaRacTeR PHO PHaN $text = str_replace("\xE0\xB8\x9F", "¿", $text); // 3615 THaI cHaRacTeR fO faN $text = str_replace("\xE0\xB8\xA0", "À", $text); // 3616 THaI cHaRacTeR PHO SaMPHaO $text = str_replace("\xE0\xB8\xA1", "Á", $text); // 3617 THaI cHaRacTeR MO Ma $text = str_replace("\xE0\xB8\xA2", "Â", $text); // 3618 THaI cHaRacTeR YO YaK $text = str_replace("\xE0\xB8\xA3", "Ã", $text); // 3619 THaI cHaRacTeR RO RUa $text = str_replace("\xE0\xB8\xA4", "Ä", $text); // 3620 THaI cHaRacTeR RU $text = str_replace("\xE0\xB8\xA5", "Å", $text); // 3621 THaI cHaRacTeR LO LING $text = str_replace("\xE0\xB8\xA6", "Æ", $text); // 3622 THaI cHaRacTeR LU $text = str_replace("\xE0\xB8\xA7", "Ç", $text); // 3623 THaI cHaRacTeR WO WaeN $text = str_replace("\xE0\xB8\xA8", "È", $text); // 3624 THaI cHaRacTeR SO SaLa $text = str_replace("\xE0\xB8\xA9", "É", $text); // 3625 THaI cHaRacTeR SO RUSI $text = str_replace("\xE0\xB8\xAA", "Ê", $text); // 3626 THaI cHaRacTeR SO SUa $text = str_replace("\xE0\xB8\xAB", "Ë", $text); // 3627 THaI cHaRacTeR HO HIP $text = str_replace("\xE0\xB8\xAC", "Ì", $text); // 3628 THaI cHaRacTeR LO cHULa $text = str_replace("\xE0\xB8\xAD", "Í", $text); // 3629 THaI cHaRacTeR O aNG $text = str_replace("\xE0\xB8\xAE", "Î", $text); // 3630 THaI cHaRacTeR HO NOKHUK $text = str_replace("\xE0\xB8\xAF", "Ï", $text); // 3631 THaI cHaRacTeR PaIYaNNOI $text = str_replace("\xE0\xB8\xB0", "Ð", $text); // 3632 THaI cHaRacTeR SaRa a $text = str_replace("\xE0\xB8\xB1", "Ñ", $text); // 3633 THaI cHaRacTeR MaI HaN-aKaT $text = str_replace("\xE0\xB8\xB2", "Ò", $text); // 3634 THaI cHaRacTeR SaRa aa $text = str_replace("\xE0\xB8\xB3", "Ó", $text); // 3635 THaI cHaRacTeR SaRa aM $text = str_replace("\xE0\xB8\xB4", "Ô", $text); // 3636 THaI cHaRacTeR SaRa I $text = str_replace("\xE0\xB8\xB5", "Õ", $text); // 3637 THaI cHaRacTeR SaRa II $text = str_replace("\xE0\xB8\xB6", "Ö", $text); // 3638 THaI cHaRacTeR SaRa Ue $text = str_replace("\xE0\xB8\xB7", "×", $text); // 3639 THaI cHaRacTeR SaRa Uee $text = str_replace("\xE0\xB8\xB8", "Ø", $text); // 3640 THaI cHaRacTeR SaRa U $text = str_replace("\xE0\xB8\xB9", "Ù", $text); // 3641 THaI cHaRacTeR SaRa UU $text = str_replace("\xE0\xB8\xBA", "Ú", $text); // 3642 THaI cHaRacTeR PHINTHU $text = str_replace("\xE0\xB8\xBF", "ß", $text); // 3647 THaI cURReNcY SYMbOL baHT $text = str_replace("\xE0\xB9\x80", "à", $text); // 3648 THaI cHaRacTeR SaRa e $text = str_replace("\xE0\xB9\x81", "á", $text); // 3649 THaI cHaRacTeR SaRa ae $text = str_replace("\xE0\xB9\x82", "â", $text); // 3650 THaI cHaRacTeR SaRa O $text = str_replace("\xE0\xB9\x83", "ã", $text); // 3651 THaI cHaRacTeR SaRa aI MaIMUaN $text = str_replace("\xE0\xB9\x84", "ä", $text); // 3652 THaI cHaRacTeR SaRa aI MaIMaLaI $text = str_replace("\xE0\xB9\x85", "å", $text); // 3653 THaI cHaRacTeR LaKKHaNGYaO $text = str_replace("\xE0\xB9\x86", "æ", $text); // 3654 THaI cHaRacTeR MaIYaMOK $text = str_replace("\xE0\xB9\x87", "ç", $text); // 3655 THaI cHaRacTeR MaITaIKHU $text = str_replace("\xE0\xB9\x88", "è", $text); // 3656 THaI cHaRacTeR MaI eK $text = str_replace("\xE0\xB9\x89", "é", $text); // 3657 THaI cHaRacTeR MaI THO $text = str_replace("\xE0\xB9\x8A", "ê", $text); // 3658 THaI cHaRacTeR MaI TRI $text = str_replace("\xE0\xB9\x8B", "ë", $text); // 3659 THaI cHaRacTeR MaI cHaTTaWa $text = str_replace("\xE0\xB9\x8C", "ì", $text); // 3660 THaI cHaRacTeR THaNTHaKHaT $text = str_replace("\xE0\xB9\x8D", "í", $text); // 3661 THaI cHaRacTeR NIKHaHIT $text = str_replace("\xE0\xB9\x8E", "î", $text); // 3662 THaI cHaRacTeR YaMaKKaN $text = str_replace("\xE0\xB9\x8F", "ï", $text); // 3663 THaI cHaRacTeR fONGMaN $text = str_replace("\xE0\xB9\x90", "ð", $text); // 3664 THaI dIGIT ZeRO $text = str_replace("\xE0\xB9\x91", "ñ", $text); // 3665 THaI dIGIT ONe $text = str_replace("\xE0\xB9\x92", "ò", $text); // 3666 THaI dIGIT TWO $text = str_replace("\xE0\xB9\x93", "ó", $text); // 3667 THaI dIGIT THRee $text = str_replace("\xE0\xB9\x94", "ô", $text); // 3668 THaI dIGIT fOUR $text = str_replace("\xE0\xB9\x95", "õ", $text); // 3669 THaI dIGIT fIVe $text = str_replace("\xE0\xB9\x96", "ö", $text); // 3670 THaI dIGIT SIX $text = str_replace("\xE0\xB9\x97", "÷", $text); // 3671 THaI dIGIT SeVeN $text = str_replace("\xE0\xB9\x98", "ø", $text); // 3672 THaI dIGIT eIGHT $text = str_replace("\xE0\xB9\x99", "ù", $text); // 3673 THaI dIGIT NINe $text = str_replace("\xE0\xB9\x9A", "ú", $text); // 3674 THaI cHaRacTeR aNGKHaNKHU $text = str_replace("\xE0\xB9\x9B", "û", $text); // 3675 THaI cHaRacTeR KHOMUT // convert 8859 to win-874 $text = str_replace("\xA1", "¡", $text); // 3585 THaI cHaRacTeR KO KaI $text = str_replace("\xA2", "¢", $text); // 3586 THaI cHaRacTeR KHO KHaI $text = str_replace("\xA3", "£", $text); // 3587 THaI cHaRacTeR KHO KHUaT $text = str_replace("\xA4", "¤", $text); // 3588 THaI cHaRacTeR KHO KHWaI $text = str_replace("\xA5", "¥", $text); // 3589 THaI cHaRacTeR KHO KHON $text = str_replace("\xA6", "¦", $text); // 3590 THaI cHaRacTeR KHO RaKHaNG $text = str_replace("\xA7", "§", $text); // 3591 THaI cHaRacTeR NGO NGU $text = str_replace("\xA8", "¨", $text); // 3592 THaI cHaRacTeR cHO cHaN $text = str_replace("\xA9", "©", $text); // 3593 THaI cHaRacTeR cHO cHING $text = str_replace("\xAA", "ª", $text); // 3594 THaI cHaRacTeR cHO cHaNG $text = str_replace("\xAB", "«", $text); // 3595 THaI cHaRacTeR SO SO $text = str_replace("\xAC", "¬", $text); // 3596 THaI cHaRacTeR cHO cHOe $text = str_replace("\xAD", "", $text); // 3597 THaI cHaRacTeR YO YING $text = str_replace("\xAE", "®", $text); // 3598 THaI cHaRacTeR dO cHada $text = str_replace("\xAF", "¯", $text); // 3599 THaI cHaRacTeR TO PaTaK $text = str_replace("\xB0", "°", $text); // 3600 THaI cHaRacTeR THO THaN $text = str_replace("\xB1", "±", $text); // 3601 THaI cHaRacTeR THO NaNGMONTHO $text = str_replace("\xB2", "²", $text); // 3602 THaI cHaRacTeR THO PHUTHaO $text = str_replace("\xB3", "³", $text); // 3603 THaI cHaRacTeR NO NeN $text = str_replace("\xB4", "´", $text); // 3604 THaI cHaRacTeR dO deK $text = str_replace("\xB5", "µ", $text); // 3605 THaI cHaRacTeR TO TaO $text = str_replace("\xB6", "¶", $text); // 3606 THaI cHaRacTeR THO THUNG $text = str_replace("\xB7", "·", $text); // 3607 THaI cHaRacTeR THO THaHaN $text = str_replace("\xB8", "¸", $text); // 3608 THaI cHaRacTeR THO THONG $text = str_replace("\xB9", "¹", $text); // 3609 THaI cHaRacTeR NO NU $text = str_replace("\xBA", "º", $text); // 3610 THaI cHaRacTeR bO baIMaI $text = str_replace("\xBB", "»", $text); // 3611 THaI cHaRacTeR PO PLa $text = str_replace("\xBC", "¼", $text); // 3612 THaI cHaRacTeR PHO PHUNG $text = str_replace("\xBD", "½", $text); // 3613 THaI cHaRacTeR fO fa $text = str_replace("\xBE", "¾", $text); // 3614 THaI cHaRacTeR PHO PHaN $text = str_replace("\xBF", "¿", $text); // 3615 THaI cHaRacTeR fO faN $text = str_replace("\xC0", "À", $text); // 3616 THaI cHaRacTeR PHO SaMPHaO $text = str_replace("\xC1", "Á", $text); // 3617 THaI cHaRacTeR MO Ma $text = str_replace("\xC2", "Â", $text); // 3618 THaI cHaRacTeR YO YaK $text = str_replace("\xC3", "Ã", $text); // 3619 THaI cHaRacTeR RO RUa $text = str_replace("\xC4", "Ä", $text); // 3620 THaI cHaRacTeR RU $text = str_replace("\xC5", "Å", $text); // 3621 THaI cHaRacTeR LO LING $text = str_replace("\xC6", "Æ", $text); // 3622 THaI cHaRacTeR LU $text = str_replace("\xC7", "Ç", $text); // 3623 THaI cHaRacTeR WO WaeN $text = str_replace("\xC8", "È", $text); // 3624 THaI cHaRacTeR SO SaLa $text = str_replace("\xC9", "É", $text); // 3625 THaI cHaRacTeR SO RUSI $text = str_replace("\xCA", "Ê", $text); // 3626 THaI cHaRacTeR SO SUa $text = str_replace("\xCB", "Ë", $text); // 3627 THaI cHaRacTeR HO HIP $text = str_replace("\xCC", "Ì", $text); // 3628 THaI cHaRacTeR LO cHULa $text = str_replace("\xCD", "Í", $text); // 3629 THaI cHaRacTeR O aNG $text = str_replace("\xCE", "Î", $text); // 3630 THaI cHaRacTeR HO NOKHUK $text = str_replace("\xCF", "Ï", $text); // 3631 THaI cHaRacTeR PaIYaNNOI $text = str_replace("\xD0", "Ð", $text); // 3632 THaI cHaRacTeR SaRa a $text = str_replace("\xD1", "Ñ", $text); // 3633 THaI cHaRacTeR MaI HaN-aKaT $text = str_replace("\xD2", "Ò", $text); // 3634 THaI cHaRacTeR SaRa aa $text = str_replace("\xD3", "Ó", $text); // 3635 THaI cHaRacTeR SaRa aM $text = str_replace("\xD4", "Ô", $text); // 3636 THaI cHaRacTeR SaRa I $text = str_replace("\xD5", "Õ", $text); // 3637 THaI cHaRacTeR SaRa II $text = str_replace("\xD6", "Ö", $text); // 3638 THaI cHaRacTeR SaRa Ue $text = str_replace("\xD7", "×", $text); // 3639 THaI cHaRacTeR SaRa Uee $text = str_replace("\xD8", "Ø", $text); // 3640 THaI cHaRacTeR SaRa U $text = str_replace("\xD9", "Ù", $text); // 3641 THaI cHaRacTeR SaRa UU $text = str_replace("\xDA", "Ú", $text); // 3642 THaI cHaRacTeR PHINTHU $text = str_replace("\xDF", "ß", $text); // 3647 THaI cURReNcY SYMbOL baHT $text = str_replace("\xE0", "à", $text); // 3648 THaI cHaRacTeR SaRa e $text = str_replace("\xE1", "á", $text); // 3649 THaI cHaRacTeR SaRa ae $text = str_replace("\xE2", "â", $text); // 3650 THaI cHaRacTeR SaRa O $text = str_replace("\xE3", "ã", $text); // 3651 THaI cHaRacTeR SaRa aI MaIMUaN $text = str_replace("\xE4", "ä", $text); // 3652 THaI cHaRacTeR SaRa aI MaIMaLaI $text = str_replace("\xE5", "å", $text); // 3653 THaI cHaRacTeR LaKKHaNGYaO $text = str_replace("\xE6", "æ", $text); // 3654 THaI cHaRacTeR MaIYaMOK $text = str_replace("\xE7", "ç", $text); // 3655 THaI cHaRacTeR MaITaIKHU $text = str_replace("\xE8", "è", $text); // 3656 THaI cHaRacTeR MaI eK $text = str_replace("\xE9", "é", $text); // 3657 THaI cHaRacTeR MaI THO $text = str_replace("\xEA", "ê", $text); // 3658 THaI cHaRacTeR MaI TRI $text = str_replace("\xEB", "ë", $text); // 3659 THaI cHaRacTeR MaI cHaTTaWa $text = str_replace("\xEC", "ì", $text); // 3660 THaI cHaRacTeR THaNTHaKHaT $text = str_replace("\xED", "í", $text); // 3661 THaI cHaRacTeR NIKHaHIT $text = str_replace("\xEE", "î", $text); // 3662 THaI cHaRacTeR YaMaKKaN $text = str_replace("\xEF", "ï", $text); // 3663 THaI cHaRacTeR fONGMaN $text = str_replace("\xF0", "ð", $text); // 3664 THaI dIGIT ZeRO $text = str_replace("\xF1", "ñ", $text); // 3665 THaI dIGIT ONe $text = str_replace("\xF2", "ò", $text); // 3666 THaI dIGIT TWO $text = str_replace("\xF3", "ó", $text); // 3667 THaI dIGIT THRee $text = str_replace("\xF4", "ô", $text); // 3668 THaI dIGIT fOUR $text = str_replace("\xF5", "õ", $text); // 3669 THaI dIGIT fIVe $text = str_replace("\xF6", "ö", $text); // 3670 THaI dIGIT SIX $text = str_replace("\xF7", "÷", $text); // 3671 THaI dIGIT SeVeN $text = str_replace("\xF8", "ø", $text); // 3672 THaI dIGIT eIGHT $text = str_replace("\xF9", "ù", $text); // 3673 THaI dIGIT NINe $text = str_replace("\xFa", "ú", $text); // 3674 THaI cHaRacTeR aNGKHaNKHU $text = str_replace("\xFb", "û", $text); // 3675 THaI cHaRacTeR KHOMUT // bullet instead of · $text = str_replace("\x95", "·", $text); // BULLET return $text; } if (!empty($_POST['encodedText'])) { $encodedText = $_POST['encodedText']; $thaiText = correctEncoding($encodedText); $ent = bin2hex($encodedText); } header("Content-type: text/html; charset=windows-874"); ?>
Fix Thai font encoding |
á¡éÀÒÉÒµèÒ§´éÒÇ |
When sending or receiving emails in Thai or copying-and-pasting Thai text between applications, it's not uncommon for an error to occur with the encoding of the Thai letters. Typically this will involve turning what used to be Thai text into a series of nonsense characters, and so rendering the text completely illegible. If you're viewing a webpage like this you may be able to fix it by changing your browser's View > Encoding setting to Thai, but if not from here we provide an easy way of restoring the text back to Thai characters. This will work for:
Simply copy and paste the text in the text box below, and it will be automatically converted back and transliterated.
@thai2english | My Account | Terms Of Use | Privacy Policy | Thanks