Are PHP string functions supported in the ASCII range, regardless of language?
No, I'm afraid not. The first counterexample is the terrible Turkish dotted-I :
setlocale(LC_CTYPE, "tr_TR"); echo strtoupper('hi!'); -> 'H\xDD!' ('HΔ°!' in ISO-8859-9)
In the worst case scenario, you may have to provide your own language-independent string binding. Calling setlocale
to return to C
or some other locale is some kind of fix, but the local POSIX-level model is very poorly suited for modern client / server applications.
bobince
source share