Hi all, I have a problem with inconsistent display of international characters between my PHP application and several MySQL GUI applications: the characters look OK but sort incorrectly in the PHP app, and they look scrambled in the MySQL GUI.
I'm developing a database of book and publisher information on Mac OS X (10.6.1) with PHP 5.3 and MySQL 5.1.39. The people using the application need to be able to enter book titles and publisher names, among other things, in French, German, and other European languages. My PHP pages all include <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> and the MySQL table holding the data uses UTF-8 as its default character set. When accented letters are entered using the Mac OS X "Special Characters" palette or the Windows "Character Map" utility, or even copied and pasted from a Word document, they go into the PHP app and are displayed back correctly. 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. When I use any GUI to view the MySQL database itself (such as CocoaMySQL or Sequel Pro or MySQL Query Browser), the accented letters are represented by _two_ completely different accented letters. (However, oddly, if I query the database from the command-line 'mysql' utility in Mac OS X Terminal, the letters look correct.) Further, when I use the same system utilities (OS X Special Characters palette or Windows Character Map) to edit values directly in the MySQL GUI, they appear correct in the GUI but break my PHP app (I get an error message from htmlspecialchars() about an illegal multibyte value). I'd be grateful for any advice you can give. -- Michael R. Boudreau Senior Publishing Technology Analyst The University of Chicago Press 1427 E. 60th Street Chicago, IL 60637 (773) 753-3298 fax: (773) 753-3383 -- PHP Unicode & I18N Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php