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.)
Р
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?
精彩评论