From 671cbc3f24ce6efa9bd7d70548fbf89ef4f1b103 Mon Sep 17 00:00:00 2001 From: BLUELOVETH Date: Sun, 4 Jun 2023 17:01:12 +0800 Subject: [PATCH] ... --- src/main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index a546509e..21e40c49 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -8,7 +8,11 @@ int main(int argc, char** argv){ pkpy::VM* vm = pkpy_new_vm(); vm->bind_builtin_func<0>("input", [](pkpy::VM* vm, pkpy::ArgsView args){ - return VAR(pkpy::getline()); + // TODO: we do not use pkpy::getline() here. It doesn't accept unicode characters. + // pkpy::getline() has bugs for PIPE input + static std::string buffer; + std::cin >> buffer; + return VAR(buffer); }); if(argc == 1){ pkpy::REPL* repl = pkpy_new_repl(vm);