There are a few things that can help. Firstly, even if you set the UTF-8 encoding in the header, this may not be enough. I saw the browser ignore this before. Try to force this by adding this to the top of your html:
<meta charset='utf-8'>
Next, as mentioned here , try to do this:
mysql_query ("set character_set_client='utf8'"); mysql_query ("set character_set_results='utf8'"); mysql_query ("set collation_connection='utf8_general_ci'");
EDIT
So, I only worked a little on the game. First let me tell you, even though I mentioned in the comments, utf8_encode() and utf8_decode() will not help you. This helps to understand the encoding of UTF-8. I found the Wikipedia page on UTF-8 very useful. Assuming that the value you are returning from the database is actually already encoded in UTF-8 encoding, and you just unload it immediately after receiving it, then this should be fine.
If you do anything with the database result (especially by manipulating the string), and you are not using unicode-enabled functions from PHP mbstring , then this will probably ruin it, as standard PHP string functions are unicode aware.
Once you understand how UTF-8 encoding works, you can do something cool:
$test = "™"; for($i = 0; $i < strlen($test); $i++) { echo sprintf("%b ", ord($test[$i])); }
Which throws something like this:
11100010 10000100 10100010
This is a correctly encoded UTF-8 '™' character. If you do not have such a character in your data obtained from the database, then something is confused.
To check, try finding a special character, which, as you know, is in the results using mb_strpos() :
var_dump(mb_strpos($db_result, '™'));
If this returns anything other than false , then the data from the database is beautiful, otherwise we can at least establish that this is a problem between PHP and the database.