On Sun, 20 Oct 2002, Michael Mauch wrote:
> >> > non-ASCII characters while you are in a "C" or "POSIX" > >> > locale, so expat or PHP can't do much to correct that. > >> > > >> > So is your locale something other than "C" or "POSIX"? > >> > "en_US.ISO-8859-1" for example? > >> > >>Yup, thats what its set to. > > Hmm. Strange. What does > > php -r 'echo strtoupper("äöü"),"\n";' > > yield on your system? And what system is it, btw? hmm, then my implementation was wrong. If I set $LC_CTYPE correctly, then it's fine. However - I have the same setting in .profile.locale, but still the XML tests fails for me. Must be a shell issue. I'll try again when I've recompiled. [...] > > Using non-ascii chars for tags, doesn't fall into the 'best practice' > > category for me, but opinions differ :) > > > > We could make strtoupper locale aware, with an optional argument > > "charset", but even then it can fail (tried it). > > Umm, strtoupper() _is_ locale aware, at least here (Linux, glibc-2.1.3): > > % php -r 'echo strtoupper("äöü"),"\n";' > ÄÖÜ > % LC_CTYPE=C php -r 'echo strtoupper("äöü"),"\n";' > äöü > > We could use a test like strtopper("äöü")=="ÄÖÜ" to check if the system > is able to handle these characters correctly. If not, the test could be > skipped. Yep - have that worked in now. > > Alas it's not possible to use setlocale() and set it to a 100% good > locale with ISO-8859-1 characters - these bloody locales are different > on each system, so you can only try and guess (of course you can do set > right for your system(s), but not for _all_ systems). Too much for a simple test. If done right, php should keep a table of all locale strings, for 'all' systems, and thats also a bit too much :) -- With kind regards, Melvyn Sopacua <?php include("not_reflecting_employers_views.txt"); ?> -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php