Question

On my mac I can run the following in a terminal (either iTerm or the Mac Terminal app, the results are the same) to get the beer mug icon printed:

echo -e "\xF0\x9F\x8D\xBA"

🍺

When I ssh to my Ubuntu machine, I can also use the same command to get the beer mug showing.

However when I load screen on the Ubuntu machine ssh session and run the same command, I just get a diamond with a question mark in it: �. This happens even if I run with screen -U.

In my environment I have the following set:

LANG=en_GB.UTF-8
LC_ALL=en_GB.UTF-8

And in my .screenrc:

defc1 off
defutf8 on

What is odd is that there is obviously some unicode stuff working properly, as when I run the following perl command, I get appropriate characters printed, whether within the screen session or not:

export PERL_UTF8_LOCALE=1 PERL_UNICODE=AS
perl -CS -e 'for($i=160;$i<10000;$i++){print chr $i, $i%30?" ":"\n"}'

Any ideas why the beer mug (for example) just suddenly stops working within a screen session?

Was it helpful?

Solution

This should be a comment, but I don't have enough reputation (if someone who does wants to make it a comment that would be great!).

If I have this right, the "beer mug" icon is outside the Unicode BMP (it's U+1F37A). Do you have the same problem with characters in the Unicode BMP (for instance echo -e "\xC3\xA9" for an accented e)?

OTHER TIPS

The quick answer is to ditch screen and use tmux instead.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top