Skip to content

Commit 8277a81

Browse files
hasarangaggerganov
andauthored
console : utf-8 fix for windows stdin (ggml-org#9690)
* utf-8 fix for windows stdin * Update common/console.cpp --------- Co-authored-by: Georgi Gerganov <[email protected]>
1 parent c919d5d commit 8277a81

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

common/console.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ namespace console {
9494
simple_io = true;
9595
}
9696
}
97+
if (simple_io) {
98+
_setmode(_fileno(stdin), _O_U8TEXT);
99+
}
97100
#else
98101
// POSIX-specific console initialization
99102
if (!simple_io) {

0 commit comments

Comments
 (0)