Currently I’m using a php web service to retrieve the information from MySQL.
I’m dealing with multiple languages including chinese/japanese/french characters, I’m having issues displaying chinese/japanese and a few other languages.
<?php
echo "你好";
?>
For example, when I’m trying to echo simple chinese characters, what shows is “ä½ å¥½” instead, I’m not sure how to proceed.
Please advise.
Thank you
You should probably set the character encoding.
This is traditionally done by setting the html content-type header. The default is usually:
Content-Type: text/html; charset=ISO-8859-1You can change this via php by using the
header()function.header('Content-Type: text/html; charset=utf-8');Some other resources for you:
http://www.w3.org/International/questions/qa-html-encoding-declarations
http://en.wikipedia.org/wiki/Character_encodings_in_HTML