View Full Version : QString and Unicode

23rd September 2010, 14:38

I am having trouble converting a given raw data into an human-readable string...

The raw data is something like this:

{"genre_id":"74","genre":"Pop","description":"Boogie with a suitcase you\u2019re living in a disco","videos":{"1":{"video_id":"6225","video":"4 minutes et 4 secondes avant la

It is a JSON format, but the problem is the "\u2019" part, which is shown like that, instead of the expected " ' " symbol

So, to resume... the data is pretty much all the time in ascii format, but now and again it contains some specific unicode symbols....

What would be the best way to convert it?

what I am doing at the moment is reading the data by using QFile, and storing it in a QByteArray, and then from this QByteArray, I create a QString which is what I show, but I was expecting NOT to see the \u2019 etc... symbols....

any ideas?

Thanks a lot