]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
console : utf-8 fix for windows stdin (#9690)
authorRuchira Hasaranga <redacted>
Mon, 30 Sep 2024 08:23:42 +0000 (13:53 +0530)
committerGitHub <redacted>
Mon, 30 Sep 2024 08:23:42 +0000 (11:23 +0300)
* utf-8 fix for windows stdin

* Update common/console.cpp

---------

Co-authored-by: Georgi Gerganov <redacted>
common/console.cpp

index f65cbc6eda0b1d1e4f45ab976fb8868be33b6c79..078a8d678d933bec79eda408ff45858758c16f37 100644 (file)
@@ -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) {