parent
b68380f09b
commit
7cb31455ee
5 changed files with 44 additions and 9 deletions
|
|
@ -4496,7 +4496,8 @@ proc substr*(s: string, first = 0): string =
|
|||
when defined(nimconfig):
|
||||
include "system/nimscript"
|
||||
|
||||
when defined(windows) and appType == "console" and defined(nimSetUtf8CodePage) and not defined(nimscript):
|
||||
when defined(windows) and appType == "console" and
|
||||
not defined(nimDontSetUtf8CodePage) 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