mirror of
https://github.com/janet-lang/janet
synced 2025-02-24 20:10:01 +00:00
Hint utf8 output on windows console.
This commit is contained in:
parent
e1bd24c2ab
commit
bea6dbbf3d
@ -38,13 +38,14 @@ int main(int argc, char **argv) {
|
||||
JanetArray *args;
|
||||
JanetTable *env;
|
||||
|
||||
/* Enable color console on windows 10 console. */
|
||||
/* Enable color console on windows 10 console and utf8 output. */
|
||||
#ifdef _WIN32
|
||||
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
DWORD dwMode = 0;
|
||||
GetConsoleMode(hOut, &dwMode);
|
||||
dwMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING;
|
||||
SetConsoleMode(hOut, dwMode);
|
||||
SetConsoleOutputCP(65001);
|
||||
#endif
|
||||
|
||||
/* Set up VM */
|
||||
|
Loading…
x
Reference in New Issue
Block a user