timster - 10:25 pm on Mar 3, 2011 (gmt 0)
The PHP function "mysql_client_encoding" ...
This returns "latin1"
Bingo, that's the problem (or at least part of it). Good work.
isn't that what mysql_query("SET NAMES utf-8"); is for?
Not quite. This statement is PHP telling MySQL what character set to expect.
Here's how to tell PHP what encoding to send to MySQL:
mysql_set_charset( 'utf8' );
Try putting that above any of your mysql_query statements. If you still get problems, try setting PHP's internal character set as well, like this:
After that I'm thinking everything should be pretty well nailed down.