diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2016-10-18 17:57:02 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2016-10-18 18:26:29 +0200 |
commit | b389f82d12c2ee2c201780cebca3e3a6852e7504 (patch) | |
tree | cb92b9dc65dc5f5d3795ef13a55b986e26bd64b2 | |
parent | f176128f0728052b10a9c7ddc6e77fdfe8ece088 (diff) | |
download | Nim-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.nim | 2 |
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 |