2013. június 14., péntek

Eastern-European htmlentities to normal UTF-8 characters

    function htmlentityLanguages($string){

// the  blog engine replaces the original text...so here is the one one image...




        $for = array(
                    "Ă","ă","Â","â","Î","î","Ş","ş","Ţ","ţ","Ș","ș", //romanian
                    "Ý","ý","Č","č","Ď","ď","Ĺ","ĺ","Ľ","ľ",//slovakian
                    "Ň","ň","Ŕ","ŕ","Š","š","Ť","ť","Ž","ž",
                    "Ě","ě","Ů","ů",                        //czeh
                    "Ą","ą","Ć","ć","Ę","ę","Ł","ł","Ń","ń","Ś","ś","Ź","ź","Ż","ż", //polish
                    "Đ","đ",
                    "Á","á","É","é","Í","í","Ö","ö","Ü","ü","Ó","ó","Ő","ő","Ú","ú","Ű","ű",  //hungarian

                );
       
        return str_replace($what,$for,$string);
    }

original txt version is here:

https://docs.google.com/file/d/0B-yUdDLcVkNiYWFQRE16TjRKd28/edit?usp=sharing