From ff823d8e6dc78b9d89dc938d2e5379970f951703 Mon Sep 17 00:00:00 2001 From: taynpg Date: Sun, 9 Nov 2025 15:31:59 +0800 Subject: [PATCH] =?UTF-8?q?cmd=EF=BC=9A=E9=BB=98=E8=AE=A4=E7=BB=88?= =?UTF-8?q?=E7=AB=AF=E9=83=A8=E5=88=86=E4=BB=A5UTF8=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 1 + Console/main.cpp | 9 +++++++++ README.md | 3 ++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4e68f63..491d310 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,6 +51,7 @@ if(WIN32) if(DEFINED XP_PLATFORM_SUPPORT) message(STATUS "Support Windows XP platform => ${XP_PLATFORM_SUPPORT}.") add_definitions(-D_WIN32_WINNT=0x0501) +add_definitions(-DXP_PLATFORM) else() #add_definitions(-D_WIN32_WINNT=0x0601) endif() diff --git a/Console/main.cpp b/Console/main.cpp index 0073fd1..41ff558 100644 --- a/Console/main.cpp +++ b/Console/main.cpp @@ -4,10 +4,19 @@ #include #include +#if defined(_WIN32) +#include +#endif + #include "Console.h" int main(int argc, char* argv[]) { + +#if defined(_WIN32) + SetConsoleOutputCP(CP_UTF8); +#endif + auto ver = Util::GetVersion(); std::cout << "==============> " << ver.toStdString() << std::endl; diff --git a/README.md b/README.md index 37ceea6..a0f4acc 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,8 @@ ## 注意事项 -请使用版本一致的三个组件,不可混用。 +- 请使用版本一致的三个组件,不可混用。 +- 终端(例如低版本Win的cmd)如果不支持UTF-8输出,则frelayConsole中文显示部分会乱码,但是功能是正常的。 ## 免责声明与警告