QString with unicode characters to QByteArray

243 Views Asked by At

I have a QString which contains some unicode chars, and I want to convert the QString to a QByteArray. (Which is later converted back to a QString)

If I use toLatin, toUtf8 or toLocal8bit the unicode characters are lost upon conversion.

How to I convert these unicode character filled QString to a QByteArray?

0

There are 0 best solutions below