At 03:45 PM 3/20/05, you wrote:
=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.
I tried it this way: $newStr = mb_convert_encoding($theTown, "ISO-8859-1", "UTF-8"); echo mb_detect_encoding($newStr);
Stills echoes ast UTF-8.
$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");
The manual only shows one parameter, but I tried it anyway and got a "too many parmeters" error.
(sigh)
Really think I'm barking up the wrong overgrown bush...