fix.修复编码问题

中文路径也能用maa辣!
windows下,路径相关的全都用gbk存储,输出到log的信息统一用utf8
This commit is contained in:
zzyyyl
2022-05-14 02:12:03 +08:00
parent b21c15dab1
commit 104646833b
8 changed files with 56 additions and 80 deletions

View File

@@ -9,12 +9,12 @@ bool asst::AbstractConfiger::load(const std::string& filename)
{
LogTraceFunction;
#ifdef WIN32
std::string cvt_filename = utils::utf8_to_gbk(filename);
#else
std::string cvt_filename = filename;
#endif
#ifdef WIN32
Log.info("Load:", utils::gbk_2_utf8(cvt_filename));
#else
Log.info("Load:", cvt_filename);
#endif
if (!std::filesystem::exists(cvt_filename)) {
return false;