PDA

View Full Version : QString unicode replace



trallallero
26th June 2012, 14:57
I have to replace ’ (unicode int num 8217) to ' (normal single quote) with QString.
How is it possible ?

Added after 12 minutes:

Ok, found.


s.replace(QString::fromWCharArray(L"\u2019"), "'");

I thought it was not working as to terminal it prints strange chars, but with the debugger I can see that it has been properly replaced.