Use utf-8 on Windows

This commit is contained in:
Aoran Zeng
2023-08-29 21:58:51 +08:00
parent 5729517002
commit dfb93c58dd
2 changed files with 10 additions and 1 deletions

View File

@@ -12,6 +12,13 @@
#include <string.h>
#include <stdlib.h>
#ifdef _WIN32
#include <windows.h>
#define xy_useutf8() SetConsoleOutputCP(65001)
#else
#define xy_useutf8()
#endif
#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
char*