Skip to content

Commit

Permalink
console : utf-8 fix for windows stdin (ggerganov#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 <ggerganov@gmail.com>
  • Loading branch information
2 people authored and dsx1986 committed Oct 29, 2024
1 parent a2f8f4b commit 063529d
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 063529d

Please sign in to comment.