From 4d9699f29014f78bbca7b11180e9bd5ee0522e73 Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Fri, 22 Sep 2023 21:41:57 +0800 Subject: [PATCH] fix https://github.com/blueloveTH/pocketpy/issues/106 ... --- src2/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src2/main.cpp b/src2/main.cpp index 6ddf15f4..17bac000 100644 --- a/src2/main.cpp +++ b/src2/main.cpp @@ -68,6 +68,12 @@ int main(int argc, char** argv){ if(argc == 1){ void* repl = pkpy_new_repl(vm); + +#if _WIN32 + SetConsoleCP(CP_UTF8); + SetConsoleOutputCP(CP_UTF8); +#endif + bool need_more_lines = false; while(true){ std::cout << (need_more_lines ? "... " : ">>> ");