diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/compat.lua | 2 | ||||
-rw-r--r-- | examples/readline.lua | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/compat.lua b/examples/compat.lua index a59d964..c712105 100644 --- a/examples/compat.lua +++ b/examples/compat.lua | |||
@@ -12,7 +12,7 @@ if sys.windows then | |||
12 | os.getenv = sys.getenv -- luacheck: ignore | 12 | os.getenv = sys.getenv -- luacheck: ignore |
13 | 13 | ||
14 | -- Set console output to UTF-8 encoding. | 14 | -- Set console output to UTF-8 encoding. |
15 | sys.setconsoleoutputcp(65001) | 15 | sys.setconsoleoutputcp(sys.CODEPAGE_UTF8) |
16 | 16 | ||
17 | -- Set up the terminal to handle ANSI escape sequences on Windows. | 17 | -- Set up the terminal to handle ANSI escape sequences on Windows. |
18 | if sys.isatty(io.stdout) then | 18 | if sys.isatty(io.stdout) then |
diff --git a/examples/readline.lua b/examples/readline.lua index 286522c..ff215dd 100644 --- a/examples/readline.lua +++ b/examples/readline.lua | |||
@@ -442,7 +442,7 @@ local backup = sys.termbackup() | |||
442 | sys.setconsoleflags(io.stdout, sys.getconsoleflags(io.stdout) + sys.COF_VIRTUAL_TERMINAL_PROCESSING) | 442 | sys.setconsoleflags(io.stdout, sys.getconsoleflags(io.stdout) + sys.COF_VIRTUAL_TERMINAL_PROCESSING) |
443 | sys.setconsoleflags(io.stdin, sys.getconsoleflags(io.stdin) + sys.CIF_VIRTUAL_TERMINAL_INPUT) | 443 | sys.setconsoleflags(io.stdin, sys.getconsoleflags(io.stdin) + sys.CIF_VIRTUAL_TERMINAL_INPUT) |
444 | -- set output to UTF-8 | 444 | -- set output to UTF-8 |
445 | sys.setconsoleoutputcp(65001) | 445 | sys.setconsoleoutputcp(sys.CODEPAGE_UTF8) |
446 | 446 | ||
447 | -- setup Posix terminal to disable canonical mode and echo | 447 | -- setup Posix terminal to disable canonical mode and echo |
448 | sys.tcsetattr(io.stdin, sys.TCSANOW, { | 448 | sys.tcsetattr(io.stdin, sys.TCSANOW, { |