diff --git a/logPlus/GeoIndicatorGenerator.cpp b/logPlus/GeoIndicatorGenerator.cpp index 54e7fc1..23675c6 100644 --- a/logPlus/GeoIndicatorGenerator.cpp +++ b/logPlus/GeoIndicatorGenerator.cpp @@ -67,6 +67,7 @@ bool GeoIndicatorGenerator::initGeoInf(QString libName, int libNum) if(!file.open(QIODevice::ReadOnly)) return false; QTextStream stream(&file); + stream.setCodec("UTF-8"); // 设置UTF-8编码 QString line; int lineNum = 0; diff --git a/logPlus/GeoIndicatorGenerator.h b/logPlus/GeoIndicatorGenerator.h index 075be76..e058ac2 100644 --- a/logPlus/GeoIndicatorGenerator.h +++ b/logPlus/GeoIndicatorGenerator.h @@ -4,6 +4,8 @@ #include #include #include +#pragma execution_character_set("utf-8") + class GeoIndicatorGenerator { public: