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