Posts tagged as ' PHP ' ...

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 www.herongyang.com. 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.

Posted By Tommy

10,000 foot view of Remoting – AMFPHP

10,000 foot view of Remoting

For a clean overview of how AMFPHP uses AMF (Actionscript Message Format), check out the documents at AMFPHP.org. Although more information than is provided on the site was still necessary for me to connect with my database, the help docs here are really great. Compared to the documentation for some other open-source projects, this one is really helpful. And since there’s a big community for AMFPHP, there are many helpful code snippets and tutorials on the Internet for it these days.