From 6a155f56e5dc64668d03ea387b86f6cc358b4f10 Mon Sep 17 00:00:00 2001 From: ValKmjolnir Date: Wed, 22 May 2024 20:02:37 +0800 Subject: [PATCH] :memo: update doc about enabling 65001 code page --- README.md | 8 ++++++++ doc/README_zh.md | 10 +++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5fd0fd0..e8b5158 100644 --- a/README.md +++ b/README.md @@ -117,6 +117,14 @@ if (os.platform()=="windows") { } ``` +Or use `std.runtime.windows.set_utf8_output()`: + +```javascript +use std.runtime; + +runtime.windows.set_utf8_output(); +``` + ## __Difference Between Andy's and This Interpreter__ ![error](./doc/gif/error.gif) diff --git a/doc/README_zh.md b/doc/README_zh.md index 77f6480..0cdd1da 100644 --- a/doc/README_zh.md +++ b/doc/README_zh.md @@ -103,7 +103,7 @@ Windows 平台的预览版解释器现在还没配置相关流水线, ![usage](../doc/gif/help.gif) -如果你是 `Windows` 用户且想正常输出unicode,在nasal代码里写这个来开启unicode代码页: +如果你是 `Windows` 用户且想正常输出 unicode,可以这样开启 unicode 代码页: ```javascript if (os.platform()=="windows") { @@ -111,6 +111,14 @@ if (os.platform()=="windows") { } ``` +或者使用 `std.runtime.windows.set_utf8_output()`: + +```javascript +use std.runtime; + +runtime.windows.set_utf8_output(); +``` + ## __与andy解释器的不同之处__ ![error](../doc/gif/error.gif)