3 Replies Latest reply: May 28, 2012 12:16 AM by Umer RSS

    Unicode Conversion

    Umer
      Hi all,

      I am currently developing an applet for SIM card in which i need to display unicode characters, I mean Urdu language. For example: Entertainment should be displayed like: تفریح
      I java it is very simple and i have tried it and it is working fine. But, I am not sure how to do it in java card.
      Any suggestions will be appreciated.

      Regards
        • 1. Re: Unicode Conversion
          Sebastien_Lorquet
          there are two difficulties here:

          -encoding
          -right to left layout

          for the first one you can find what a phone supports by trying all encodings. I would guess utf-8

          For the second, I have no idea. Maybe the phone text engine will know that these characters must be displayed right to left?

          Maybe it will display that, because it does not know that they must be linked : ت ف ر ی ح

          Maybe it will display the characters, but left to right.

          Anyways firefox always displays these characters from right to left, even if I add spaces or symbols between them, and the textbox editor behaves funny when I select these characters and try to copy-paste them :)
          • 2. Re: Unicode Conversion
            safarmer
            You may be over complicating things a little. Given Java Card does not know about strings, you should be able to encode the data in what ever encoding you need when you set the string (either personalisation data or as a hard coded byte array) and when you present the stream of bytes to the phone it should be able to represent it correctly. You would only need to know about the encoding if you want to build a dynamic string from bytes.

            Shane
            • 3. Re: Unicode Conversion
              Umer
              Thank you, indeed it is helpful.

              Dear Sabestian thank you to you too : )