Skip to content

Commit

Permalink
add utf8 support
Browse files Browse the repository at this point in the history
  • Loading branch information
argrath committed Nov 3, 2024
1 parent aeed60e commit 8eff794
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sys/windows/consoletty.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit 8eff794

Please sign in to comment.