1 2 3 4 5 6 7 8
| //bon caracteres
$GoodCharaters = array ("¡","¢","£","¤","¥","¦","§","¨","©","ª","«","¬","*","®","¯","°","±","²","³","´","µ","¶","·","¸","¹","º","»","¼","½","¾","¿","×","÷","À","Á","Â","Ã","Ä","Å","Æ","Ç","È","É","Ê","Ë","Ì","Í","Î","Ï","Ð","Ñ","Ò","Ó","Ô","Õ","Ö","Ø","Ù","Ú","Û","Ü","Ý","Þ","ß","à","á","â","ã","ä","å","æ","ç","è","é","ê","ë","ì","í","î","ï","ð","ñ","ò","ó","ô","õ","ö","ø","ù","ú","û","ü","ý","þ","ÿ");
//Mauvais caractères
$BadCharacters = array ("¡","¢","£","¤","Â¥","¦","§","¨","©","ª","«","¬","Â*","®","¯","°","±","²","³","´","µ","¶","·","¸","¹","º","»","¼","½","¾","¿","Ã","÷","Ã","Ã","Ã","Ã","Ã","Ã
","Ã","Ã","Ã","Ã","Ã","Ã","Ã","Ã","Ã","Ã","Ã","Ã","Ã","Ã","Ã","Ã","Ã","Ã","Ã","Ã","Ã","Ã","Ã","Ã","Ã","à ","á","â","ã","ä","Ã¥","æ","ç","è","é","ê","ë","ì","Ã*","î","ï","ð","ñ","ò","ó","ô","õ","ö","ø","ù","ú","û","ü","ý","þ","ÿ");
// remplacer les mauvais caracatères par les bons et encoder le tout en utf8
$website_description = utf8_encode(str_replace($BadCharacters ,$GoodCharaters ,$website_description)); |
Partager