Update chat.cpp
This commit is contained in:
parent
285ca17ecb
commit
81bd894c51
1 changed files with 3 additions and 1 deletions
4
chat.cpp
4
chat.cpp
|
@ -889,8 +889,10 @@ int main(int argc, char ** argv) {
|
|||
// Windows console ANSI color fix
|
||||
DWORD mode = 0;
|
||||
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
if (hConsole && hConsole != INVALID_HANDLE_VALUE && GetConsoleMode(hConsole, &mode))
|
||||
if (hConsole && hConsole != INVALID_HANDLE_VALUE && GetConsoleMode(hConsole, &mode)){
|
||||
SetConsoleMode(hConsole, mode | ENABLE_VIRTUAL_TERMINAL_PROCESSING);
|
||||
SetConsoleOutputCP(CP_UTF8);
|
||||
}
|
||||
#endif
|
||||
|
||||
fprintf(stderr, "%s: interactive mode on.\n", __func__);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue