Skip to main content

display unicode on lwuit components

Please note these forums are being decommissioned and use the new and improved forums at
4 replies [Last post]
Joined: 2010-04-08

i want to display unicode on LWUIT components.
when i use the following
Form f= new Form("\u0074\u0065\u0073\u0074");
PS:\u0074\u0065\u0073\u0074 is the unicode ot the word test
the word test appears on the title perfectly.
if i do the same but this time using locHash.get function to get the string from the resource's Localization file as followed:
Form f= new Form((String) locHash.get("testlabel"));
PS:testlabel in resource Localization file holds the unicode of the word test.
the unicode does not get rendered to the word test it apears at it is \u0074\u0065\u0073\u0074
does anyone know why is that happening??
I tried to search the forum but it seems there's a prblem with the search engine please help me out i need to find a solution as quick as possible.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2003-11-07

That's not unicode, that's a Java source file specific slash 'u' notation.
Just type a local character into the resource editor and it will work, alternatively you can import \u files into the resource editor localization section.

Joined: 2013-06-18

Sorry, I'm confused with something about "alternatively you can import \u files into the resource editor localization section."
1. What are "\u files"? where to get them?
2. What is "resource editor localization section“?
3. How to import?


Joined: 2011-08-02

dear vprise

my problem is that i have localized persian and english for my application but when i set language for persian nothing appear on the form title, and the same happend for Commands but the same Persian text appear in other Components like Label, Dialog, Button, ...even when i set tform title or dommand name as persian constants , they r not comming in the form..
but In English all of them are getting appeared, do i need to write extra codes for title and command?? does LWUIT localization support translation of command and title automatically?
pls helppppppp is very eargent
tanx in advance

Joined: 2003-11-07

Opening 3 old threads within a few minutes is not very helpful.

You are using a bitmap font, either switch to using a system font or add the characters in the persian language to the bitmap font.