Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My characters are in Chinese Simplified that stored in MySQL database by all tables and character set to UTF-8.

I am reading them to my PHP page that runs under resin server on Windows XP Professional.

My Resin server version is 4.0.15; PHP version is 5.3.2; and MySQL is 5.5.

Any idea how to retrieve the Chinese character data to my PHP page and displaying them in correct Chinese words? I get the Question Mark ("?") on those Chinese characters.

If I am typing Chinese character on PHP page, it can display correct Chinese words on web page. So, I assume is the connection between MySQL and PHP have problem.

But previously when I was running under Apache, there is no character problem. May I know why?

share|improve this question

Try issuing a mysql command as soon as you open a db connection from php

"set names utf8;"

My guess is though, if it worked on apache, then its likely the character set of the html that is wrong. Add some character set headers in your web server config, todeclare that the document is utf. Perhaps its defaulting to latin as some do?

Hard to say what else might be causing it, without more info. But character set issues can often be quite frustrating to troubleshoot

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.