Posted By Tommy

Chinese Character String with UTF-8 Encoding.

Chinese Character String with UTF-8 Encoding.

If you’re interested in doing anything with PHP or mySQL in Chinese, you’d better head over to He has analyzed several different aspects of the PHP 5 and UTF-8 problem, and his advice can really get you through some difficulties.

Hopefull PHP 6 will support UTF-8, but until then we have troubles. The reason is that if you’re sending data to php, it needs to get encoded. It also has to save data in memory. Then the data goes to mySQL, becoming reencoded in the process. Getting the data back out is just as hard, requiring five re-encodings. So language difficulties really confound us!

One thing that he didn’t mention is that there can’t be a BOM marker as the first character of a php text file. It prevented some of my Chinese from working.

Post a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Tags Comment Meta:
RSS Feed for comments
TrackBack URI