I\'ve been pulling my hear out over this problem for a few hours yesterday:
I\'ve a database on MySQL 4.1.22 server with encoding set to \"UTF-8 Unicode (utf8)\" (as rep
SOLUTION for me:
set this option in your php file, after mysql_connect (or after mysql_select_db)..
mysql_query("SET NAMES 'utf8'");
Ugh... ok, seems I found a solution.
MySQL isn't the culprit here. I did a simple dump and load now, with no changes to the dump.sql script - meaning I left "set names latin2" and tables charsets as they were. Then I switched my original CMSMS installation over to the new database and... it worked correctly. So actually encoding in the database is ok, or at least it works fine with CMSMS installation I had at my old hosting provider (CMSMS apparently does funny things with characters encoding).
To make it work on my new hosting provider, I actually had to add this line to lib/adodb/drivers/adodb-mysql.inc.php in CMSMS installation:
mysql_query('set names latin2',$this->_connectionID);
This is a slightly modified solution from this post. You can find the exact line there as well. So it looks like mysql client configuration issue.
Did you try adding the --default-character-set=name option, like this:
mysql --default-character-set=utf8 -h ffffd -u zzz -p dbname < dump.sql
I had that problem before and it worked after using that option.
Hope it helps!