For exemple, if I use a function like:
function string_cleaner($string) {
$replace = array('Ø', 'ø', 'ă', 'ü'); // more and more special chars
$replacement = array('', '', 'a', 'u');
$string = str_replace($replace, $replacement, $string);
return $string;
}
This does not work when I call, and use these special characters. With other simple characters I don’t have problems…
The strings are UTF-8 encrypted. What would be the cause?
Check and make sure that your source files are encoded in UTF-8 as well. This can be easily avoided in the future by changing the default encoding to UTF-8 within your text editor of choice.