Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
Posts: 3
Registered: ‎04-23-2009
My Device: Not Specified

Read/Drawing Unicode String?

Hi,

 

I got an XML file with some pre-compound unicode strings (encoding = utf-8), when I draw these strings using drawText(), some weird charactors appear.

 

Same strings in composite unicode  from normal text file can be drawn correctly.

 

So, how can I draw pre-compound unicode strings with drawText, or is there a way to convert them to composite unicde?

 

BlackBerry Development Advisor
Posts: 15,882
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Read/Drawing Unicode String?

Highlighted
BlackBerry Development Advisor
Posts: 15,882
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Read/Drawing Unicode String?

If the characters you are trying to draw don't exist on the BlackBerry handheld and/or current font then question marks should appear in their place.

 

Also, note that by default String objects are created in the ISO-8859-1 format.  You can specify the encoding of a String object by using a String constructor that accepts an encoding format.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Regular Contributor
Posts: 69
Registered: ‎04-05-2010
My Device: Storm
My Carrier: BSNL

Re: Read/Drawing Unicode String?

I dont have access to the Moved to URL mentioned here Smiley Sad

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Read/Drawing Unicode String?

I think you might find that the URL included merely indicates that the question was moved to the Java forum, so the answer to your question is the last post from mark Sohm.