Re: International characters look OK in PHP app, not in MySQL GUI
Darren Cook <[email protected]> Tue, 13 Oct 2009 08:37:59 +0900
| Newsgroups | gmane.comp.php.internationalization |
|---|---|
| Message-ID | <[email protected]> |
> The problem in the PHP app is that they don't sort in the correct order. For
> ex., capital E with any accent sorts between A and B.
That's a curious symptom. I've no suggestion, but the other information
you didn't give was:
a) do you have the mbstring extension installed (and if so, what is the
internal_encoding, and the other settings)?
b) do you have the intl extension installed (and, again, what settings)?
c) what is the server's locale setting?
The first two you can get from a phpinfo() page. For the 3rd I think
$_ENV["LANG"] is it, or this should confirm it:
print_r(setlocale(LC_ALL,"0"));
Also take a look at http://jp.php.net/setlocale and try setting
"en_US.UTF8" explicitly at the top of your script. The comments say Mac
requires "UTF-8", so you might also want to try:
setlocale(LC_ALL,Array("en_US.UTF8","en_US.UTF-8"));
(untested)
Darren
P.S. On the MySQL side have a look at the collation setting of the database.
--
Darren Cook, Software Researcher/Developer
http://dcook.org/gobet/ (Shodan Go Bet - who will win?)
http://dcook.org/mlsn/ (Multilingual open source semantic network)
http://dcook.org/work/ (About me and my work)
http://dcook.org/blogs.html (My blogs and articles)
--
PHP Unicode & I18N Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php