From 1e031d1c886abeac1fa7d3374411975b7cd846bd Mon Sep 17 00:00:00 2001 From: TaurusXin Date: Wed, 20 Mar 2024 12:04:55 +0800 Subject: [PATCH] fix: missing convertsion on msvc --- main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 2d2a5fc..4907a4a 100644 --- a/main.cpp +++ b/main.cpp @@ -53,8 +53,10 @@ int wmain(int argc, wchar_t* utf16argv[]) int main(int argc, char **argv) #endif { -#if defined(_WIN32) && defined(__MINGW64__) +#if defined(_WIN32) +#if defined(__MINGW64__) SetConsoleOutputCP(CP_UTF8); +#endif char **argv = (char**)malloc(sizeof(char *) * argc); for (int i = 0; i < argc; ++i) { int utf8_size = WideCharToMultiByte(CP_UTF8, 0, utf16argv[i], -1, NULL, 0, NULL, NULL);