fix: missing convertsion on msvc

This commit is contained in:
TaurusXin 2024-03-20 12:04:55 +08:00
parent edea72fd24
commit 1e031d1c88
1 changed files with 3 additions and 1 deletions

View File

@ -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);