Files
renovate-sh-app[bot]GitHubrenovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com>Oleg Kozliuk
4b24cde0e2 fix(deps): update module github.com/olekukonko/tablewriter to v1 (#5920)
* fix(deps): update module github.com/olekukonko/tablewriter to v1

| datasource | package                           | from   | to     |
| ---------- | --------------------------------- | ------ | ------ |
| go         | github.com/olekukonko/tablewriter | v0.0.5 | v1.1.2 |


Signed-off-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com>

* Fixed compilation errors due to breaking changes

---------

Signed-off-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com>
Co-authored-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com>
Co-authored-by: Oleg Kozliuk <[email protected]>
2026-01-05 10:05:39 +00:00

35 lines
608 B
Go

//go:build windows && !appengine
// +build windows,!appengine
package runewidth
import (
"os"
"syscall"
)
var (
kernel32 = syscall.NewLazyDLL("kernel32")
procGetConsoleOutputCP = kernel32.NewProc("GetConsoleOutputCP")
)
// IsEastAsian return true if the current locale is CJK
func IsEastAsian() bool {
if os.Getenv("WT_SESSION") != "" {
// Windows Terminal always not use East Asian Ambiguous Width(s).
return false
}
r1, _, _ := procGetConsoleOutputCP.Call()
if r1 == 0 {
return false
}
switch int(r1) {
case 932, 51932, 936, 949, 950:
return true
}
return false
}