From 8eff794498d3a2607250d072575e1f92725e1ae2 Mon Sep 17 00:00:00 2001 From: SHIRAKATA Kentaro Date: Fri, 20 Sep 2024 21:07:06 +0900 Subject: [PATCH] add utf8 support --- sys/windows/consoletty.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/windows/consoletty.c b/sys/windows/consoletty.c index 576929e6e..e4c4d27aa 100644 --- a/sys/windows/consoletty.c +++ b/sys/windows/consoletty.c @@ -114,6 +114,10 @@ cell_t undefined_cell = { { CONSOLE_UNDEFINED_CHARACTER, 0, 0, 0, 0, 0, 0 }, static const uint8 empty_utf8str[MAX_UTF8_SEQUENCE] = { 0 }; #endif /* VIRTUAL_TERMINAL_SEQUENCES */ +#if 1 /*JP*/ +/*#define ICUTF8 /* 内部コードUTF-8 */ +#endif + /* * The following WIN32 Console API routines are used in this file. * @@ -1336,7 +1340,11 @@ xputc2_core(const unsigned char *str) } int ret = MultiByteToWideChar( +#ifdef ICUTF8 + CP_UTF8, +#else CP_ACP, +#endif MB_PRECOMPOSED, (const char *)str, strlen((const char *)str),