specify utf-8 when reading in files
This commit is contained in:
parent
c2a033e3fe
commit
3002fc650e
2 changed files with 2 additions and 0 deletions
|
@ -33,6 +33,7 @@ void KeyValueConfigBase::load() {
|
||||||
}
|
}
|
||||||
|
|
||||||
QTextStream in(&file);
|
QTextStream in(&file);
|
||||||
|
in.setCodec("UTF-8");
|
||||||
QList<QString> configLines;
|
QList<QString> configLines;
|
||||||
QRegularExpression re("^(?<key>.+)=(?<value>.+)$");
|
QRegularExpression re("^(?<key>.+)=(?<value>.+)$");
|
||||||
while (!in.atEnd()) {
|
while (!in.atEnd()) {
|
||||||
|
|
|
@ -1248,6 +1248,7 @@ QString Project::readTextFile(QString path) {
|
||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
QTextStream in(&file);
|
QTextStream in(&file);
|
||||||
|
in.setCodec("UTF-8");
|
||||||
QString text = "";
|
QString text = "";
|
||||||
while (!in.atEnd()) {
|
while (!in.atEnd()) {
|
||||||
text += in.readLine() + "\n";
|
text += in.readLine() + "\n";
|
||||||
|
|
Loading…
Reference in a new issue