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

Native Development

Reply
Developer
alupimp
Posts: 22
Registered: ‎03-05-2011
My Device: Not Specified
Accepted Solution

Special Characters

Hi,

 

I've been trying to display in a ListView some words that contain Special Characters, but i can only manage to get garbage displayed when it comes to these chars. The groupdata assigned to the ListView contains data from an rss that looks like:

 

http://tr3sco.com/betas/BB10/news.xml

 

Is there any way to encode those special characters to view the correctly?

 

P.D.: I am using the QDomDocument to parse the doc and the values are obtained with "nodeValue();" which returns a QString

BlackBerry Development Advisor (Retired)
gperry
Posts: 138
Registered: ‎05-11-2012
My Device: Developer

Re: Special Characters

Unicode characters aren't supported right now as far as I know, hopefully in the near future.

 

Regards

Graham

Developer
alupimp
Posts: 22
Registered: ‎03-05-2011
My Device: Not Specified

Re: Special Characters

Ive found the solution:

When downloading the info from the web and parsing it with the QDomDocument this will work:

QString aux(QString::fromUtf8(node1.nodeValue().toAscii()));

now if you assign aux to any label or text area it will show the accents...

Developer
RodgerLeblanc
Posts: 90
Registered: ‎04-08-2013
My Device: Z10

Re: Special Characters

This worked for me too, thanks!