mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-19 10:32:19 +08:00
fix.修复编码问题
中文路径也能用maa辣! windows下,路径相关的全都用gbk存储,输出到log的信息统一用utf8
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user