I have a line edit that contains a file name with Unicode-characters and it displays correctly in the GUI, but when I print it with
qDebug() << ui->lineEditFileName->text();
It seems that the Unicode text is 'lost in translation', because Qt Creator uses
QString::fromLocal8Bit() when reading the debug output from the process.
I found the answer from this thread:
I don’t know what qDebug uses to put strings onto the console on windows (I assume QString::toLocal8Bit). I know that Qt Creator uses QString::fromLocal8Bit(…) to read the text from the process. That works great everywhere… but unfortunately there is one OS out there that still insists on using codepages that completely break any attempt to display more than one kind of script at a type.