I started the website some time ago using the wrong CHARSET in my database and website. HTML was set to ISO ... and DB to Latin ..., the page was saved to Western Latin ... a big mess.
The site is in French, so I created a function that replaced all accents like "é" with " é". Which temporarily resolved the problem.
I just found out about programming, and now my files are saved as Unicode UTF-8, HTML is in UTF-8, and my MySQL table columns are set to ut8_encoding ...
I tried to shift the emphasis to "é" instead of " é", but I get the usual encoding problems with (?) Or weird “Ã ¢” characters both in MySQL and when the page is displayed.
I need to find a way to update my sql using a function that clears strings so that it can finally return to its normal state. At the moment, my function looks like this, but does not work:
function stripAcc3($value){
$ent = array(
'à'=>'à',
'â'=>'â',
'ù'=>'ù',
'û'=>'û',
'é'=>'é',
'è'=>'è',
'ê'=>'ê',
'ç'=>'ç',
'Ç'=>'Ç',
"î"=>'î',
"Ï"=>'ï',
"ö"=>'ö',
"ô"=>'ô',
"ë"=>'ë',
"ü"=>'ü',
"Ä"=>'ä',
"€"=>'€',
"′"=> "'",
"é"=> "é"
);
return strtr($value, $ent);
}
Any help is appreciated. Thanks in advance. If you need a code, let me know which part.
UPDATE
If you want to receive bonus points, I need detailed instructions on how to do this. Thank.