thanks but set cp936 seems do not work in msys2
[https://github.com/zacharycarter/blt-nim](https://github.com/zacharycarter/blt-nim)
may be a solution for simple console-like interactive
There's a simpler way to change the codepage
import os
discard execShellCmd("chcp 936")
Don't use Windows. Seems to be bad software
No seriously. I have no idea. I can only guess what to look for. Does msys2 try
to make `getCurrentEncoding` behave correctly? Does msys2 try to make
everything more unix like and make the shell utf8? Does msys2 have any
information about encoding?
Don't use msys? Seems to be bad software.
actually I have tested getCurrentEncoding, which gives gb2312 in both msys and
DOS as Araq says. So what is the solution?
Are you sure? `getCurrentEncoding` maps to some Windows API call but how does
the Windows API know about Msys2's non-standard default encoding?
You need to use proc getCurrentEncoding(). This file has exactly what you need
[https://github.com/retsyo/xlsx2csv/blob/master/develop/xlsx2csv.nim](https://github.com/retsyo/xlsx2csv/blob/master/develop/xlsx2csv.nim)
I am a Chinese Windows user.
I use Msys2+Mingw64 (export LANG="EN.UTF-8") to compile nim app. But I also use
windows7 DOS console(the default codepage is cp936, which is almost gb2312).
The following code performs different in msys2 and windows's console.
So my question, how to let the EXE