From 6bc28e7cd5b2a1ccd1a32f915b398a1148228f4a Mon Sep 17 00:00:00 2001 From: garak Date: Sat, 9 Feb 2019 15:27:45 -0500 Subject: [PATCH] specify utf-8 when reading in files --- src/config.cpp | 1 + src/project.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/src/config.cpp b/src/config.cpp index 79f90735..1eef943f 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -33,6 +33,7 @@ void KeyValueConfigBase::load() { } QTextStream in(&file); + in.setCodec("UTF-8"); QList configLines; QRegularExpression re("^(?.+)=(?.+)$"); while (!in.atEnd()) { diff --git a/src/project.cpp b/src/project.cpp index c62af2c3..fd0de92c 100644 --- a/src/project.cpp +++ b/src/project.cpp @@ -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";