[bugfix] make -d:nimSetUtf8CodePage switch work again
This commit is contained in:
parent
d37c4e44d3
commit
dd39b11b13
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue