If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Not support utf-8: Where is the problem?

Hi there,

My web server on Windows 7 displays all utf-8 chars well but not on Linux even both MySQL database is created with "CHARACTER SET utf8 COLLATE utf8_unicode_ci", and all php pages are created with utf-8. Where is the problem pn Linux: Apache configuration or php5 configuration? Both use Apache as web server.

Also, I check mysql, all setting is utf8 as below. Use Aqua Data Studio to display, it doesn't show correct, even correct by connecting to mysql on Windows. More strange is another page using mysqli displaying the content correct. Do this mean the problem is PDO?
Before the string is sent to mysql, it's handled by addslashes function.

It's proved the problem is PHP MySQL PDO module: in the same php page, both mysqli and PDO are used in almost the same way, the same query by mysqli displays result properly, but not the one with PDO:
mysqli: displays - This is a 鮓lunch menu
PDO: displays -This is a é®“lunch menu

In Windows platform (both PHP and MySQL installed on Windows), both are the same.