From e0871d7be63dd428d4a2b9a3db4e033894165cef Mon Sep 17 00:00:00 2001 From: Thijs Schreijer Date: Wed, 19 Jun 2024 22:05:33 +0200 Subject: add system.CODEPAGE_UTF8 for 65001 codepage --- doc_topics/03-terminal.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc_topics') diff --git a/doc_topics/03-terminal.md b/doc_topics/03-terminal.md index 06a6b96..9bad359 100644 --- a/doc_topics/03-terminal.md +++ b/doc_topics/03-terminal.md @@ -51,8 +51,8 @@ recent versions of Lua also have UTF-8 support. So `luasystem` also focusses on On Windows UTF-8 output can be enabled by setting the output codepage like this: - -- setup Windows output codepage to UTF-8; 65001 - sys.setconsoleoutputcp(65001) + -- setup Windows output codepage to UTF-8 + sys.setconsoleoutputcp(sys.CODEPAGE_UTF8) Terminal input is handled by the [`_getwchar()`](https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/getchar-getwchar) function on Windows which returns UTF-16 surrogate pairs. `luasystem` will automatically convert those to UTF-8. -- cgit v1.2.3-55-g6feb