#include <iostream>
#include <QString>
using namespace std;
int main()
{
QString qstr = QString::fromUtf8(" ");
cout << qstr.length() << std::endl;
for (QChar c : qstr) cout << QString(c).toStdString() << endl;
}
Got output:
19
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
Expected output:
11
Qt version:
Package: qt5-default Architecture: amd64 Version: 5.5.1+dfsg-16ubuntu7.7 Multi-Arch: same Priority: optional Section: universe/libs Source: qtbase-opensource-src Origin: Ubuntu
How to fix this?