summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-10-18 17:57:02 +0200
committerAndreas Rumpf <rumpf_a@web.de>2016-10-18 18:26:29 +0200
commitb389f82d12c2ee2c201780cebca3e3a6852e7504 (patch)
treecb92b9dc65dc5f5d3795ef13a55b986e26bd64b2
parentf176128f0728052b10a9c7ddc6e77fdfe8ece088 (diff)
downloadNim-b389f82d12c2ee2c201780cebca3e3a6852e7504.tar.gz
Windows console apps do not set the codepage to UTF-8 anymore; use -d:nimSetUtf8CodePage to re-enable this feature
-rw-r--r--lib/system.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/system.nim b/lib/system.nim
index fae111ce2..3e3f56e31 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