UTF-8 encoding woes...

I have a Chinese text which I want to dynamically load into my app, so I’m connecting to my server using network.request. However, the Chinese UTF-8 now arrives as garbage text when I print it on the console or display it in a text on screen. The same text as returned from my server shows fine in, say, Google Chrome. I’m declaring a http header (‘Content-Type: text/plain; charset=utf-8’), I’m *not* using a BOM Byte-Order Mark at the beginning of my file, and I’ve tried saving using different editors, to no avail so far. Can anyone please help? Thanks!!

PS: If I’m not entirely mistaken then I *did* get to this to work in an older version of Corona (but I might be mistaken). I’m using basically the same code now but maybe I do something else differently or the Corona build number changed… [import]uid: 10284 topic_id: 7296 reply_id: 307296[/import]

I’m experiencing something similar. text such as “Seriøusly” when read from a webpage is coming back as “Seriøusly” I can’t figure out a way around this. [import]uid: 27896 topic_id: 7296 reply_id: 27862[/import]

also I saw your post on stackoverflow, did you submit this as a bug already? [import]uid: 27896 topic_id: 7296 reply_id: 27863[/import]

Has anyone solved this? [import]uid: 22737 topic_id: 7296 reply_id: 40902[/import]

I reported it as a bug, it was fixed in one of the daily builds [import]uid: 47357 topic_id: 7296 reply_id: 40908[/import]

Yes, it’s solved in the newer builds. Chinese text now comes through fine. (Now I included a little ?supportsUnicode=true parameter for the URL I’m fetching so that my app can differentiate between old and new installs, and send text appropriately.) [import]uid: 10284 topic_id: 7296 reply_id: 40977[/import]

What version of the daily builds make this work? I am sending Swedish åäö characters from my app to my server and they are still stored as crappy text. [import]uid: 22737 topic_id: 7296 reply_id: 41001[/import]

It worked for a while already, and most definitely in the latest builds (on iOS anyway, don’t know about Android). Are you sure your server is sending the right character encoding header, e.g. ‘Content-Type: text/plain; charset=utf-8’? You can check the URL with http://www.webconfs.com/http-header-check.php [import]uid: 10284 topic_id: 7296 reply_id: 41004[/import]

Hey
My problem is that its when I user the Facebook Connect API and then the names which contains Swedish characters ÅÄÖ it will not send it from the app to the server correct. Or do you mean that the receiving server has to be configured to receive UTF-8 encoded data? [import]uid: 22737 topic_id: 7296 reply_id: 42882[/import]

To clarify, the issue I had which is solved now was to receive Unicode data. Your issue seems to be to send Unicode data, so it’s the reverse. Perhaps in your case the receiving server doesn’t understand you’re sending UTF-8? Just a guess… [import]uid: 10284 topic_id: 7296 reply_id: 42982[/import]