change to set encoding
This commit is contained in:
parent
ae19dbd694
commit
df8b98bc6c
@ -13,7 +13,7 @@ public:
|
|||||||
QFile *file = new QFile(resource.fileName());
|
QFile *file = new QFile(resource.fileName());
|
||||||
file->open(QFile::ReadOnly | QFile::Text);
|
file->open(QFile::ReadOnly | QFile::Text);
|
||||||
QTextStream in(file);
|
QTextStream in(file);
|
||||||
in.setAutoDetectUnicode(true);
|
in.setEncoding(QStringConverter::Encoding::Utf8);
|
||||||
QString content = in.readAll();
|
QString content = in.readAll();
|
||||||
file->close();
|
file->close();
|
||||||
delete file;
|
delete file;
|
||||||
|
Reference in New Issue
Block a user