Handle char encoding on logs more correctly

This commit is contained in:
Yukino Song
2025-04-01 21:27:30 +08:00
parent a31828dd9c
commit e271592408
5 changed files with 75 additions and 6 deletions

View File

@@ -1087,7 +1087,11 @@ namespace config {
}
for (auto &[name, val] : vars) {
BOOST_LOG(info) << "config: '"sv << name << "' = "sv << val;
#ifdef _WIN32
BOOST_LOG(info) << "config: ["sv << name << "] -- ["sv << utf8ToAcp(val) << ']';
#else
BOOST_LOG(info) << "config: ["sv << name << "] -- ["sv << val << ']';
#endif
}
bool_f(vars, "headless_mode", video.headless_mode);