diff --git a/internal/cli/cli_windows.go b/internal/cli/cli_windows.go new file mode 100644 index 0000000000..1c8cf1fd53 --- /dev/null +++ b/internal/cli/cli_windows.go @@ -0,0 +1,12 @@ +package cli + +import "golang.org/x/sys/windows" + +func init() { + + kernel32 := windows.NewLazySystemDLL("kernel32.dll") + setConsoleCP := kernel32.NewProc("SetConsoleCP") + // Set codepage to UTF-8 + // https://learn.microsoft.com/en-us/windows/win32/intl/code-page-identifiers#:~:text=Unicode%20(UTF%2D7)-,65001,-utf%2D8 + setConsoleCP.Call(uintptr(65001)) +}