How to make the GNU screen recognize UTF-8 characters

I like to have different hints in bash to quickly recognize which machine I work on when I use ssh . I found that by default, the bash terminal in OSX Yosemite accepts a wide range of Unicode characters, so I installed these PS1 :

Mac PS1

 PS1=$'\n\n\xf0\x9f\x98\x88'" \t – \[\033[01m\]\ u@ \h\[\033[00m\]:\W > " 

Raspberry Ο€ PS1

 PS1=$'\n\n\xf0\x9f\x98\xBA'" \t – \[\033[01m\]\ u@ \h\[\033[00m\]:\W > " 

Unfortunately, the GNU screen does not understand UTF-8 characters:

even when working in UTF-8 mode with screen -U

Any idea how to solve this problem?

+6
source share
2 answers

Instead of using the GNU screen, use Tmux if possible. This terminal multiplexer has good UTF-8 support.

I am not a MAC user, but it seems that this package can be installed on OSX (by doing brew install tmux )

+1
source

1) On the GNU CTRL + A screen, enter the following screen directive:

: utf8 on

(I don’t know why -U does not.)

2) Also check your language by typing " locale -a " at the command prompt.

This should have UTF-8 at the top of the output.

-1
source

Source: https://habr.com/ru/post/983095/


All Articles