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 --- spec/04-term_spec.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'spec') diff --git a/spec/04-term_spec.lua b/spec/04-term_spec.lua index d5b4eee..e888920 100644 --- a/spec/04-term_spec.lua +++ b/spec/04-term_spec.lua @@ -8,7 +8,7 @@ describe("Terminal:", function() setup(function() wincodepage = system.getconsoleoutputcp() - assert(system.setconsoleoutputcp(65001)) -- set to UTF8 + assert(system.setconsoleoutputcp(system.CODEPAGE_UTF8)) -- set to UTF8 end) teardown(function() @@ -346,8 +346,8 @@ describe("Terminal:", function() end) local new_cp - if old_cp ~= 65001 then - new_cp = 65001 -- set to UTF8 + if old_cp ~= system.CODEPAGE_UTF8 then + new_cp = system.CODEPAGE_UTF8 -- set to UTF8 else new_cp = 850 -- another common one end @@ -403,8 +403,8 @@ describe("Terminal:", function() end) local new_cp - if old_cp ~= 65001 then - new_cp = 65001 -- set to UTF8 + if old_cp ~= system.CODEPAGE_UTF8 then + new_cp = system.CODEPAGE_UTF8 -- set to UTF8 else new_cp = 850 -- another common one end @@ -578,8 +578,8 @@ describe("Terminal:", function() -- get the console page... local new_cp - if old_cp ~= 65001 then - new_cp = 65001 -- set to UTF8 + if old_cp ~= system.CODEPAGE_UTF8 then + new_cp = system.CODEPAGE_UTF8 -- set to UTF8 else new_cp = 850 -- another common one end -- cgit v1.2.3-55-g6feb