Doesn't render UTF-8 characters in WSL running Ubuntu
llagerlof opened this issue · comments
Describe the bug
Doesn't render UTF-8 characters in WSL running Ubuntu.
To Reproduce
- Install Ubuntu for WSL.
- Start WSL with "bash" command.
- Install tmux and gitmux.
- Configure tmux to load gitmux
- Run tmux
- Enter some directory under git control.
- Look at the gitmux info bar on bottom-right. The first and last characters are question marks.
Expected behavior
The question marks should be UTF-8 characters.
Screenshot
Environment:
- gitmux version:
gitmux -V
0.7.4
- tmux version:
tmux -V
tmux next-3.3
- OS
Windows 10
- shell (bash/fish/...)
bash
- your gitmux config
gitmux.cfg
if you're not using the default one.
Using default.
- in case the problem only happens in a specific directory, please paste the
output ofgitmux -dbg
in that directory.
Happens on all git repositories
Additional context
Locale output:
LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=en_US.UTF-8
The new Windows Terminal
It works when I run bash inside the new Windows Terminal.
Thank you for reporting @llagerlof
gitmux
and tmux
, as well as other terminal applications, can only show characters which are defined with the font your terminal is using.
To solve this, you can either:
- install another font that contains the specific chars using by gitmux.
or - replace the problematic characters. To do this, you need to save the default configuration with
gitmux -printcfg > gitmux.cfg
. Modify thesymbols:
section of the configuration file. Finally change howgitmux
is invoked intmux.conf
since you'll now need to pass the path to your config file with-cfg
.
Whatever solution you choose, please let me know, it would be nice to complete the readme with specific instructions/configuration for users with an environment similar to yours.
Thanks
I configure the bash window to use the same font of the new Windows Terminal (Cascadia Mono). Unfortunaly didn't worked. Same problem (weird).
I configured the "Consolas font for powerline". Same result.
After some testing I realized it is a problem of the terminal itself. It isn't accepting UTF-8 characters.
I will use the new Windows Terminal.
You can close this issue if you wish. Thank you.
Ok thanks for the heads up.
Out of curiosity what terminal are you using which doesn't support utf8?
The Windows 10 default/classic terminal. I just executed "c:\Windows\system32\bash.exe". I even looked at the default codepage of the terminal. It was set to "65001 UTF-8", whatever 65001 means.