From 24eafb2ac5df444dab621d3d68292e6ae239a310 Mon Sep 17 00:00:00 2001 From: xiyoo0812 Date: Thu, 18 Apr 2024 17:48:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81windows=E4=B8=8B=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E6=98=BE=E7=A4=BA=E4=B8=AD=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/quanta/src/execute.cpp | 2 -- core/quanta/src/quanta.cpp | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/quanta/src/execute.cpp b/core/quanta/src/execute.cpp index fb5687c1..540aec56 100644 --- a/core/quanta/src/execute.cpp +++ b/core/quanta/src/execute.cpp @@ -4,8 +4,6 @@ int main(int argc, const char* argv[]) { init_quanta(argv[1], argv[2]); - const char* data = call_quanta("get_world_addr"); - printf("============================: %s\n", data); while (true) { if(run_quanta() != 0) break; } diff --git a/core/quanta/src/quanta.cpp b/core/quanta/src/quanta.cpp index 9f3d4c5f..69d82a58 100644 --- a/core/quanta/src/quanta.cpp +++ b/core/quanta/src/quanta.cpp @@ -306,6 +306,9 @@ luakit::lua_table quanta_app::init() { const char* env_service = get_env("QUANTA_SERVICE"); logger::get_logger()->option(env_log_path, env_service, env_index); } +#ifdef WIN32 + m_lua.run_script("os.setlocale('.UTF8')"); +#endif m_lua.run_script(fmt::format("require '{}'", get_env("QUANTA_SANDBOX")), [&](std::string_view err) { exception_handler("load sandbox err: {}", err); });