Hi,
I cannot get the right text into the QString.
QByteArray ba
= "abcÄćžšđ ABCČĆŽŠÄ.";
//OK char* cTmp = ba.data(); //OK
QString sTmp1
= "abcÄćžšđ ABCČĆŽŠÄ.";
//NOT OK - data = "abc�枚� ABC�Ǝ��." QString sTmp2
= QObject::trUtf8("abcÄćžšđ ABCČĆŽŠÄ.");
//NOT OK - data = "abc�枚� ABC�Ǝ��."
QByteArray ba = "abcÄćžšđ ABCČĆŽŠÄ."; //OK
char* cTmp = ba.data(); //OK
QString sTmp1 = "abcÄćžšđ ABCČĆŽŠÄ."; //NOT OK - data = "abc�枚� ABC�Ǝ��."
QString sTmp2 = QObject::trUtf8("abcÄćžšđ ABCČĆŽŠÄ."); //NOT OK - data = "abc�枚� ABC�Ǝ��."
To copy to clipboard, switch view to plain text mode
I have also set:
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
To copy to clipboard, switch view to plain text mode
What am I doing wrong?
Bookmarks