From 78d4c1daa13eaded4712f439fd72881a99d79f92 Mon Sep 17 00:00:00 2001 From: xia-chu <771730766@qq.com> Date: Sat, 20 Apr 2024 21:19:27 +0800 Subject: [PATCH] =?UTF-8?q?Windows=E5=B9=B3=E5=8F=B0=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E8=BE=93=E5=87=BAutf-8=E5=AD=97=E7=AC=A6=E9=9B=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Util/logger.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Util/logger.cpp b/src/Util/logger.cpp index 5232df3c..9be4e8be 100644 --- a/src/Util/logger.cpp +++ b/src/Util/logger.cpp @@ -79,6 +79,10 @@ Logger::Logger(const string &loggerName) { _logger_name = loggerName; _last_log = std::make_shared(); _default_channel = std::make_shared("default", LTrace); + +#if defined(_WIN32) + SetConsoleOutputCP(CP_UTF8); +#endif } Logger::~Logger() {