specify utf-8 when reading in files

This commit is contained in:
garak 2019-02-09 15:27:45 -05:00 committed by huderlem
parent ed39c36db4
commit 6bc28e7cd5
2 changed files with 2 additions and 0 deletions

View file

@ -33,6 +33,7 @@ void KeyValueConfigBase::load() {
}
QTextStream in(&file);
in.setCodec("UTF-8");
QList<QString> configLines;
QRegularExpression re("^(?<key>.+)=(?<value>.+)$");
while (!in.atEnd()) {

View file

@ -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";