I have these two strings:
$str1 = 'Ö';
$str2 = 'Ö';
$e1 = mb_detect_encoding($str1);
$e2 = mb_detect_encoding($str2);
var_dump($str1);
var_dump($str2);
echo 'e1: '.$e1.', e2: '.$e2;
the result is:
string(3) "Ö"
string(2) "Ö"
e1: UTF-8, e2: UTF-8
It seems that they are not only German characters but also each of them is different so converting them to ASCII this way
PHP: Replace umlauts with closest 7-bit ASCII equivalent in an UTF-8 string
doesn't produce equal results. Is there a way to convert both of these strings to one of these ASCII forms BNOE
or BNO
?
I know that maybe I could copy Ö from both and include in strtr
search and replace array but I don't know how to reproduce all the charactes encoded the same way the first Ös are.