console : utf-8 fix for windows stdin (#9690)
* utf-8 fix for windows stdin * Update common/console.cpp --------- Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
This commit is contained in:
parent
c919d5db39
commit
8277a817f1
1 changed files with 3 additions and 0 deletions
|
@ -94,6 +94,9 @@ namespace console {
|
||||||
simple_io = true;
|
simple_io = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (simple_io) {
|
||||||
|
_setmode(_fileno(stdin), _O_U8TEXT);
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
// POSIX-specific console initialization
|
// POSIX-specific console initialization
|
||||||
if (!simple_io) {
|
if (!simple_io) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue