=James Birkholz= wrote:
Well, I just tried:
mb_convert_encoding($theTown, "ISO-8859-1", "UTF-8");
echo mb_detect_encoding($theTown);
You need to be looking at the return value from the function; it doesn't
change the parameters.
$newStr = utf8_decode($theTown) ;
echo mb_detect_encoding($newStr);
but I still get "UTF-8" echo'ed...
did I do it wrong?
If you don't give it a sensible list of encodings to try,
mb_detect_encoding() seems to give totally incorrect results. Try:
echo mb_detect_encoding($newStr, "UTF-8,ISO-8859-1,ASCII");
-- brion vibber (brion @
pobox.com)