hi!
i'm currently having some troubles with UTF-8 encoded strings. i'm using a PHP script run by mod_rewrite to link my users' profiles with a short URL (http://user.mysite.net/username).
i found that with some browsers i'm having trouble with non-ASCII chars in these URLs, but some other browsers work fine. i checked the strings passed by these browsers and saw that some browsers use UTF-8 encoding and others don't. so just using uft8_decode() doesn't help as URLs which contain URL-encoded non-ASCII chars aren't passed correctly but are also UTF-8-decoded and then contain some "?".
i searched the web and several discussion boards but i couldn't find a way to recognize UTF-8 strings. i tried Multibyte String's mb_detect_encoding() function but if i set "UTF-8, ISO-8859-1" as encoding list, it always detects UTF-8 and the other way round.
my last idea would be to not allow users to use "?" in their usernames and check if the result of utf8_decode() contains some "?" and if it does, the string wasn't UTF-8 encoded. i guess that way would work, but i don't like it, as it is a very bad workaround.
any help would be greatly appreciated.