Skip to content

Commit 81bd894

Browse files
authored
Update chat.cpp
1 parent 285ca17 commit 81bd894

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

chat.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -889,8 +889,10 @@ int main(int argc, char ** argv) {
889889
// Windows console ANSI color fix
890890
DWORD mode = 0;
891891
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
892-
if (hConsole && hConsole != INVALID_HANDLE_VALUE && GetConsoleMode(hConsole, &mode))
892+
if (hConsole && hConsole != INVALID_HANDLE_VALUE && GetConsoleMode(hConsole, &mode)){
893893
SetConsoleMode(hConsole, mode | ENABLE_VIRTUAL_TERMINAL_PROCESSING);
894+
SetConsoleOutputCP(CP_UTF8);
895+
}
894896
#endif
895897

896898
fprintf(stderr, "%s: interactive mode on.\n", __func__);

0 commit comments

Comments
 (0)