To get i18n working properly in php and mysql, you have to:
- make sure your mysql database AND tables AND fields are in collation utf8_unicode_ci
- have your html pages in utf-8 character set: <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- force the server to send utf-8 encoding: before every page output, do this: header("Content-Type: text/html;charset=UTF-8");
- It's not enough to just have the mysql server in utf-8, you have to force the mysql client to use utf-8 encoding too, which means on every database connection, first do this: $res = mysql_query("SET NAMES 'utf-8'");
And that seems to work pretty well. Of course, you can have all this set in your various config files too of your http server, your mysql server, your php.ini and such, but these things above you can just do them all in the code.