mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-03 02:18:00 +00:00
[bugfix] make -d:nimSetUtf8CodePage switch work again
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user