summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authormiere43 <x.miere@gmail.com>2016-07-30 18:25:48 +0300
committermiere43 <x.miere@gmail.com>2016-07-30 18:31:01 +0300
commitf16140fc9599e3c12a3dfe912cac1819c04174d7 (patch)
treedad7392b0a3240fd0887b190ee5e75f7278a9c32 /lib
parentdfee2bf66e80c950b7aa2be62dc0deab74aa56e7 (diff)
downloadNim-f16140fc9599e3c12a3dfe912cac1819c04174d7.tar.gz
fix #4417, update news
Diffstat (limited to 'lib')
-rw-r--r--lib/system.nim5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/system.nim b/lib/system.nim
index 6a9b52d24..0c2cc2466 100644
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -3670,3 +3670,8 @@ template closureScope*(body: untyped): untyped =
 
 when defined(nimconfig):
   include "system/nimscript"
+
+when defined(windows) and compileOption("app", "console"):
+  proc setConsoleOutputCP(codepage: cint): cint {.stdcall, dynlib: "kernel32",
+    importc: "SetConsoleOutputCP".}
+  discard setConsoleOutputCP(65001) # 65001 - utf-8 codepage
\ No newline at end of file