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
Highlighted
Developer
Posts: 230
Registered: ‎01-12-2013
My Device: z30
My Carrier: Mobile Vikings
Accepted Solution

Shows è as è ?

Hello developers

 

The string that I get from a server can have characters with accents, such as shown in the title: Liège. Apparently, a label translates those characters to other weird combinations. As you an see in the title

 

è -> è

 

How can I solve this issue?

 

Thans in advance!

______________________________________________________
BB10-OAuth: GitHub
Developer
Posts: 1,524
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

Re: Shows è as è ?

Hi,
This could be an encoding problem. How do you convert QByteArray to a string? If the data is in UTF-8:

QString s = QString::fromUtf8(byteArray.data(), byteArray.size());

Andrey Fidrya, @zmeyc on twitter
Developer
Posts: 230
Registered: ‎01-12-2013
My Device: z30
My Carrier: Mobile Vikings

Re: Shows è as è ?

Thank you!

 

I think it's solved. The RSS feed is empty at the moment but an early test indicates that it works. I did not use the function fromUtf8.

______________________________________________________
BB10-OAuth: GitHub