Encoding problem with polish chars
-
Hi ,
lately I started to face strange problem:
For e.g.:
If I pass polish characters to combobox everything is ok and they are correctly displayed,
but if I try to print them with qDebug() or save to file I get something like:
qDebug() << "option oneąęŻŹ";
console output: option oneaeZZAny idea how to fix that?
-
Hi ,
lately I started to face strange problem:
For e.g.:
If I pass polish characters to combobox everything is ok and they are correctly displayed,
but if I try to print them with qDebug() or save to file I get something like:
qDebug() << "option oneąęŻŹ";
console output: option oneaeZZAny idea how to fix that?
-
Hi,
QFile file("someFile.txt"); if(file.open(QIODevice::WriteOnly | QIOdevice::Text)) { QTextSTream out(&file); out << "option oneąęŻŹ"; file.close(); }
@Kaluss You can try to set codec, see http://doc.qt.io/qt-5/qtextstream.html#setCodec
-
Hi,
QFile file("someFile.txt"); if(file.open(QIODevice::WriteOnly | QIOdevice::Text)) { QTextSTream out(&file); out << "option oneąęŻŹ"; file.close(); }
@Kaluss said in Encoding problem with polish chars:
out << "option oneąęŻŹ";
What about this:
out << QString::fromUtf8("option oneąęŻŹ");
-