Here's the problem: I want to be able to discern if my terminal is capable of decent unicode or not, in order to use some characters or not, much like glances does, that sometimes uses colors and others underline.
The motivation arises because in any kind of virtual terminal I get decent fonts, but I understand that the basic Linux console has a character set of 256 or 512 simultaneous symbols, so you cannot expect full font support.
At first I thought that I could use
$TERM or tty, but here's the catch: I'm using byobu too, so
$TERM is always "screen.linux". The output of tty is also not very telling:
/dev/pts/<some number> in both "real" and virtual terms.
$BYOBU_TTY is no help either, because e.g. it may be
/dev/tty1 and when the session is opened in Ctrl+Alt+F1 the characters don't show but when attaching to the same session from some X term, they show properly and still
$BYOBU_TTY does not change. Besides, I'd like to be able to detect this without presuming byobu is there or not.
Also, locale shows in all cases en_US.UTF-8
Yet somehow glances (to name a particular tool I see detecting this), even inside byobu, uses different output depending on the terminal I'm attaching to the byobu session.
I'm having trouble with google because terminal and tty seem too common search terms. At most I arrive at solutions recommending
$TERM or tty.