1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

compiler: always define _UNICODE and UNICODE on Windows

This commit is contained in:
vitalyster
2019-09-17 14:56:32 +03:00
committed by Alexander Medvednikov
parent 79a98d7bcf
commit 52c5f0172e
6 changed files with 12 additions and 16 deletions

View File

@ -333,12 +333,10 @@ fn (v mut V) generate_main() {
// vlib can't have `init_consts()`
cgen.genln('void init_consts() {
#ifdef _WIN32
#ifndef _BOOTSTRAP_NO_UNICODE_STREAM
_setmode(_fileno(stdout), _O_U8TEXT);
SetConsoleMode(GetStdHandle(STD_OUTPUT_HANDLE), ENABLE_PROCESSED_OUTPUT | 0x0004);
// ENABLE_VIRTUAL_TERMINAL_PROCESSING
#endif
#endif
g_str_buf=malloc(1000);
$consts_init_body
}')