Closed fosskers closed 4 years ago
This isn't htop's fault. It's rather a problem with your terminal - it lacks font to display braille characters. The solution should vary among terminals, so there's little we can help.
@hishamhm This problem could be mentioned as part of your FAQ.
Or, if I have time, I might be able to add a display option to disable braille and use ASCII [ .:]
as a workaround to this.
Even after installing the braille fonts available for my Linux distro, it doesn't work.
@fosskers It works in my terminal (Ubuntu 14.04 with gnome-terminal or xterm), so there is nothing I can help you.
Maybe you should try this command on your shell (outside htop) first and see what it produces:
printf '[\xe2\xa0\x89\xe2\xa0\x9b\xe2\xa0\xbf\xe2\xa3\xbf]\n'
You should see [⠉⠛⠿⣿] four braille characters. These are what they were encoded in UTF-8.
If you see four diamonds or four rectangle blocks, there is something wrong with your terminal config.
By the way, the Ctrl+Alt+F[1-6] console in Linux is very limited and won't support braille font display; so you don't need to try in that.
Wow, odd, it works in xterm
, but not my usual terminal urxvt
.
I have the same problem, with xterm
it's working, with the KDE konsole
not - even If I change the konsole
font to one which supports braille character (e.g. in LibreOffice).
@fosskers I use urxvt
myself. I launch it like this:
urxvt -cr green -fn '*-lode-*' -fb '*-lode-*' -fi '*-lode-*' -fbi '*-lode-*' -depth 32 -bg rgba:0000/0000/0000/efff -fg #bbb -sb -sr +st -sl 100000 -b 0 -tn rxvt
('lode' is a custom font, but it does not include braille characters, so those come from the system defaults)
Running rxvt-unicode 9.15 here. And I use xterm-color
as the value of $TERM, but even when I launch it as TERM=rxvt htop
, the braille characters display fine.
Also, I'm using
LANG=en_US.UTF-8
LC_ALL=en_US.UTF-8
in case it matters.
I have LANG=en_US.UTF-8
. Previously it seems my TERM
was set to linux
. Odd. However, none of the values of rxvt
, xterm
or xterm-color
display the braille.
Setting LC_ALL=en_US.UTF-8
also has no effect.
The contents of my .Xdefaults
:
! urxvt settings
URxvt.background : #202020
URxvt.foreground : #999999
URxvt.font : xft:monaco:bold:size=7
URxvt.scrollBar : False
URxvt.pointBlank : true
URxvt.transparent: true
URxvt.shading: 25
! black #202020
URxvt.color0 : #202020
URxvt.color8 : #202020
! red
URxvt.color1 : #bb4444
URxvt.color9 : #bb4444
! green
URxvt.color2 : #44bb44
URxvt.color10 : #44bb44
! yellow
URxvt.color3 : #bbbb44
URxvt.color11 : #bbbb44
! blue
URxvt.color4 : #4444aa
URxvt.color12 : #4444aa
! magenta
URxvt.color5 : #bb44bb
URxvt.color13 : #bb44bb
! cyan
URxvt.color6 : #44bbbb
URxvt.color14 : #44bbbb
! white
URxvt.color7 : #999999
URxvt.color15 : #999999
! Colouring for man pages.
URxvt.colorIT : #87af5f
URxvt.colorBD : #d7d7d7
URxvt.colorUL : #87afd7
! urxvt-perls
URxvt.perl-ext-common: default,clipboard,url-select,keyboard-select
URxvt.url-select.launcher: qutebrowser
URxvt.url-select.underline: true
URxvt.keysym.M-u: perl:url-select:select_next
URxvt.keysym.M-Escape: perl:keyboard-select:activate
URxvt.keysym.M-s: perl:keyboard-select:search
! For xshogi
XShogi*font: xft:Inconsolata-g:bold:size=8
! For Japanese/Cantonese input
URxvt.inputMethod: ibus
URxvt.preeditType: OverTheSpot
$TERM is nothing to do with this! Overwriting that variable changes nothing to your terminal behavior! What it does is only faking shells and user programs into thinking you are using another terminal rather then actual one you are using. You shouldn't change that variable most of the time.
Here's a summary of what terminals will work fine (display braille) and what will not. I list here so you guys don't need to test: TERM=linux (Linux console) : Fail. TERM=xterm (xterm and compatibles like gnome-terminal) : Should work, but not guaranteed. TERM=rxvt (the original rxvt): Fail. TERM=rxvt-unicode (rxvt-unicode a.k.a. urxvt) : Works.
Any more terminals? Feel free to test more and give us results.
And herein lies our issue, because I'm finding that urxvt
is not working. So, then what could be different about my setup and @hishamhm 's, if we're both using that terminal and seeing different results?
@fosskers I would guess it's your choice of fonts.
@Explorer09 termite seems to be working fine
sakura
also works. It's default font (can't tell what it is) has unique looking braille characters.
The demos of htop2 with
Graph
mode look great. Here is what I see what I try that:Am I missing something? Is this a lack of proper font, or maybe is
ncurses
not playing well with said font? For the record, anotherncurses
program of mine is able to display some asian characters, so it shouldn't be entirely a UTF8 problem.