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:
Ruchira Hasaranga 2024-09-30 13:53:42 +05:30 committed by GitHub
parent c919d5db39
commit 8277a817f1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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) {