mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
add Win32_CODEPAGES enum and enable utf8 console output on win32 (#2670)
* add Win32_CODEPAGES enum and enable utf8 console output on win32 --------- Co-authored-by: Christoffer Lerno <christoffer@aegik.com>
This commit is contained in:
@@ -7,6 +7,9 @@
|
||||
#ifdef __OpenBSD__
|
||||
#include <sys/resource.h>
|
||||
#endif
|
||||
#if PLATFORM_WINDOWS
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
bool debug_log = false;
|
||||
|
||||
@@ -36,6 +39,11 @@ int main_real(int argc, const char *argv[])
|
||||
getrlimit(RLIMIT_DATA, &l);
|
||||
l.rlim_cur = l.rlim_max;
|
||||
setrlimit(RLIMIT_DATA, &l);
|
||||
#endif
|
||||
#if PLATFORM_WINDOWS
|
||||
// Set the console input and output codepage to utf8 to handle utf8 text correctly
|
||||
SetConsoleCP(CP_UTF8);
|
||||
SetConsoleOutputCP(CP_UTF8);
|
||||
#endif
|
||||
bench_begin();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user