Cyrillic characters while JSON decoding
I have a PHP script that makes an JSON array.
When i parse the array with my Titanium android aplication, it crashes when i use cyrillic characters like \u0425 or \u0442 :)
It only happens with russian,macedonian,serbian characters. It works with english normal…
I use latest Continious Builds.
3 Answers
-
It doesn't even work if i convert \num to char :) It looks like JSON doesn't support cyrillic alphabet
-
There is nothing wrong with either Json or JavaScript unless you are looking for a language thats not a part of UNICODE..
i happened to play with the UNICODE on titanium a while ago and tried with my native Language(Tamil-Indic script)…
I am pretty sure JavaScript supports UNICODE as i checked it out with a simple html page and a document.write… and the Language Letters displayed properly on web browser…
But then with Titanium it can parse a json with Unicode and if you use a Ti.API.debug on the unicode retrived from the json object it displays (Language Letters) flawlessly on the Titanium debugger window… but not on the Android Emulator..
I tried on my device but no luck … all i could see was Square boxes and i researched on the android forums and found out hat Android emulator(and the device ofcourse) does not support various fonts(i know this sounds weired while using UNICODE on webview but it still doesn recognise the fonts)…
-
Problem solved by simple rebuilding the project.
@Sattanaathan Ravi:
My language doesn't need special fonts , it would work on Arial or Tahoma.