Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

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.

— asked October 4th 2010 by Filip Dimitrovski
  • android
  • json
  • mobile

3 Answers

  • It doesn't even work if i convert \num to char :) It looks like JSON doesn't support cyrillic alphabet

    — answered October 4th 2010 by Filip Dimitrovski
  • 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)…

    — answered October 5th 2010 by Satta Ravi
    1 Comment
    • does this mean I can't use UNICODE like '\u0425' on Android? I run into the same issue and see always just square boxes. Is there a workaround?

      — commented January 3rd 2011 by Jicks Steen
  • Problem solved by simple rebuilding the project.

    @Sattanaathan Ravi:
    My language doesn't need special fonts , it would work on Arial or Tahoma.

    — answered October 5th 2010 by Filip Dimitrovski
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.