* finish the Windows IO layer changes; refs #11618 * added system.getOsFileHandle which is less error-prone on Windows * make tests green again
This commit is contained in:
parent
ac7a365137
commit
742862b847
4 changed files with 55 additions and 8 deletions
|
|
@ -4496,12 +4496,6 @@ proc substr*(s: string, first = 0): string =
|
|||
when defined(nimconfig):
|
||||
include "system/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
|
||||
|
||||
when not defined(js):
|
||||
proc toOpenArray*[T](x: ptr UncheckedArray[T]; first, last: int): openArray[T] {.
|
||||
magic: "Slice".}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue