From b389f82d12c2ee2c201780cebca3e3a6852e7504 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Tue, 18 Oct 2016 17:57:02 +0200 Subject: [PATCH] Windows console apps do not set the codepage to UTF-8 anymore; use -d:nimSetUtf8CodePage to re-enable this feature --- lib/system.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/system.nim b/lib/system.nim index fae111ce2b..3e3f56e313 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -3676,7 +3676,7 @@ template closureScope*(body: untyped): untyped = when defined(nimconfig): include "system/nimscript" -when defined(windows) and appType == "console" and not defined(nimconfig): +when defined(windows) and appType == "console" and defined(nimSetUtf8CodePage): proc setConsoleOutputCP(codepage: cint): cint {.stdcall, dynlib: "kernel32", importc: "SetConsoleOutputCP".} discard setConsoleOutputCP(65001) # 65001 - utf-8 codepage