Closed E3V3A closed 5 years ago
Take a look at this thread, it might help. If it does or doesn't let me know: https://github.com/wtfutil/wtf/issues/225
As @gdamore said:
Tcell, and hence wtf, won’t work with mingw inside mintty.
However, another user stated it was "working" in Zsh, but now I'm wondering if he was actually running Zsh in ConEmu
. If there is no work-around to what gdamore said, then we can close this issue as not supported / won't fix
.
I followed @mapitman hint of adding UTF-16 to the tcell/encoding.go
file:
func init() {
// We always support UTF-8 and ASCII.
encodings = make(map[string]encoding.Encoding)
encodings["utf-8"] = gencoding.UTF8
encodings["utf8"] = gencoding.UTF8
encodings["utf-16"] = gencoding.UTF8
encodings["utf16"] = gencoding.UTF8
encodings["utf-16UL"] = gencoding.UTF8
encodings["us-ascii"] = gencoding.ASCII
encodings["ascii"] = gencoding.ASCII
encodings["iso646"] = gencoding.ASCII
}
This resulted in a new error: Error: no suitable screen available
, but still runs in all Windows consoles. However, interestingly using Cygwin with:
TERM="" ./wtf.exe
starts without error, but doesn't show anything, just hanging. This is actually good news. (No news is good news!) So something is happening and running somewhere.
Similarly starting the following in PS results in the same error:
$env:TERM='xterm'
.\bin\wtf.exe
Just FYI and from Cygwin FAQ:
4.18
Why don't international (Unicode) characters work?Internationalization is a complex issue. The short answer is that Cygwin relies on the setting of the setting of LANG/LC_xxx environment variables. The long answer can be found in the User's Guide in the section Internationalization
Cygwin uses UTF-8 by default. To use a different character set, you need to set the
LC_ALL, LC_CTYPE
orLANG
environment variables.
4.19
My application prints international characters but I only see gray boxesIn the case of Cygwin programs, this likely means that the character set as determined by the LC_ALL, LC_CTYPE or LANG environment variables does not match the one set on the Text page of the Cygwin Terminal's options. Setting the locale in the terminal's options will set the LANG variable accordingly.
Non-Cygwin programs in the Cygwin Terminal do not usually take heed of the locale environment variables. Instead, they often use the so-called console codepage, which can be determined with the command:
cmd /c chcp <codepage>
followed by the appropriate Windows codepage number. The codepage number for Cygwin's default UTF-8 character set is 65001.
Closing for now, as this is a bug of tcell. and not WTF.
There might have been some updates to tcell
according to:
Good to hear. I'll update the tcell dependency and bring that in.
tcell has been updated to the latest and is in master.
Following procedure in #350 results in the weird error:
Error: character set not supported
However, the binaries run fine anyway!
System: Cygwin/POSIX
How can I help debug?