From dd39b11b139f5d7b94249e011698f453857ea92b Mon Sep 17 00:00:00 2001 From: Araq Date: Mon, 1 Jul 2019 10:35:52 +0200 Subject: [bugfix] make -d:nimSetUtf8CodePage switch work again --- lib/system.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/system.nim b/lib/system.nim index 61978e23c..256410522 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -4468,7 +4468,7 @@ proc substr*(s: string, first = 0): string = when defined(nimconfig): include "system/nimscript" -when defined(windows) and appType == "console" and defined(nimSetUtf8CodePage): +when defined(windows) and appType == "console" and defined(nimSetUtf8CodePage) and not defined(nimscript): proc setConsoleOutputCP(codepage: cint): cint {.stdcall, dynlib: "kernel32", importc: "SetConsoleOutputCP".} discard setConsoleOutputCP(65001) # 65001 - utf-8 codepage -- cgit 1.4.1-2-gfad0