Forum Moderators: coopster
to make sure that the characters are encoded. I tried it on localhost on my laptop and it works perfectly (the Chinese characters are displayed properly).
The problem is that when I upload the page folder onto the server, the characters cannot be displayed; there are some funny-looking scribbles like this:
欢迎å‚与本æ
but the page works fine.
Does anything know what the problem is? Thank you!
some ideas:
create a file with phpinfo() in it and run it. Check HTTP_ACCEPT_CHARSET to verify that server accepts utf-8 (most likely) and/or chinese charsets
are you pulling data from a mysql database? If yes, make sure that your db can accept chinese charsets OR that the data are in chinese chars stored there
- you can force your db to use an encoding with these two lines:
mysql_query("SET character_set_connection=english");
mysql_query("SET character_set_client=english");
Put those (and take a look at mysql manual for those) right below your mysql_select_db() line and use the appropriate charset for you