I would like to convert a QString containing Unicode characters to plain HTML text. For instance “私” would become “私”.
Is there such a functionality in Qt? I found the function QString Qt::escape ( const QString & plain ) but it only converts HTML metacharacters <, >, &, and “.
There seems to be a lot of Qt classes and functions for encoding and internationalization but I just don’t know where to look at.
I asked in Qt Centre forums and someone gave me the answer I needed. Here it is.
Here is the code that was suggested and that solved my problem: