Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
4.7.1
-
None
-
ARM embedded linux system+QtEmbedded, no locale support in system.
Description
There is a file with a non-English name("файл"): /mnt/external_a1/файл (filename in russian).
This code demonstrates the problem: in console printed "0" => qt thinks file not exists.
#include <QApplication> #include <QFileInfo> #include <QString> #include <QTextCodec> #include <stdio.h> int main(int argc, char **argv) { QApplication app(argc, argv); QString f; QFileInfo fi; QTextCodec *UTF8Codec=QTextCodec::codecForName("UTF-8"); QTextCodec::setCodecForCStrings(UTF8Codec); f="/mnt/external_a1/файл"; printf("%d\n", QFile::exists(f)); return app.exec(); }
The problem appears after adding a row
QTextCodec::setCodecForCStrings(UTF8Codec);
This line is needed for another code, but breaks this functionality.
On the x86-desktop, this problem does not occur.