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.
there are two difficulties here:
-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 :)
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.