开发者

What encoding does Flash Builder use to send non-English data to servers?

In my site I use Unicode... I hoped when I'll connect Flash Builder to my server (using Data -> connect to HTTP ) It will work with my API sending Russian text as UTF-8 but instead it sends Þûõó ïúушúøý to my API and so to DB and so on instead of my favourite UT开发者_运维百科F-8 Русское Имя 2... So what encoding uses flash builder and How to make Flash Application send UTF-8 data to my server or some other readable format?


The Flash application is sending UTF-8 to your application, but you're interpreting it as ISO-8859-1. Make sure your application keeps all data in UTF-8 all the way through and this won't be a problem. (Outline of using UTF-8 with MySQL.)

&#1056; isn't UTF-8, it's an HTML character reference. You don't want your client side to be sending you HTML-encoded content and you definitely don't want HTML-encoded content inside the database. Keep it all raw UTF-8 bytes until the moment it goes onto an HTML page (and then use htmlspecialchars() to encode < and & in the text, but leave non-ASCII characters alone.


Flash is very good at keeping everything UTF-8, so the likely culprit here is PHP. I've made the mistake of not setting the proper encoding for the MySQL connection more than a couple of times, maybe that is your problem?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜