0

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?

Jonathan
  • 11
  • 5
  • Also here: http://unix.stackexchange.com/questions/81923/gnu-screen-doesnt-echo-unicode-characters-correct – Jonathan Apr 24 '14 at 13:19

2 Answers2

1

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)?

p_a_c
  • 275
  • 2
  • 7
  • Yes that works in screen and non-screen sessions. This page suggests that the beer is unicode character: http://www.fileformat.info/info/unicode/char/1f37a/index.htm – Jonathan Apr 24 '14 at 12:54
-1

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

Jonathan
  • 11
  • 5