Skip to content

Commit

Permalink
console : utf-8 fix for windows stdin (#9690)
Browse files Browse the repository at this point in the history
* utf-8 fix for windows stdin

* Update common/console.cpp

---------

Co-authored-by: Georgi Gerganov <[email protected]>
  • Loading branch information
hasaranga and ggerganov authored Sep 30, 2024
1 parent c919d5d commit 8277a81
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions common/console.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ namespace console {
simple_io = true;
}
}
if (simple_io) {
_setmode(_fileno(stdin), _O_U8TEXT);
}
#else
// POSIX-specific console initialization
if (!simple_io) {
Expand Down

0 comments on commit 8277a81

Please sign in to comment.