Skip to main content

display unicode on lwuit components

4 replies [Last post]
alya
Offline
Joined: 2010-04-08
Points: 0

hello
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.
vprise
Offline
Joined: 2003-11-07
Points: 0

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.

nelsonzou
Offline
Joined: 2013-06-18
Points: 0

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?

Thanks.

YAVANIA
Offline
Joined: 2011-08-02
Points: 0

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 me...it is very eargent
tanx in advance

vprise
Offline
Joined: 2003-11-07
Points: 0

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.