GNU Screen – Fixing Unicode Character Echo Issues

gnu-screenterminalunicode

When I do this in my terminal:

echo -e "\xF0\x9f\x8d\xba"

I get a cool beer mug in my terminal: ?

However, when I start screen, and try the same, I'm getting a �. How do I get the nice beer mug?

This is my .screenrc:

nethack on
startup_message off
defscrollback 3000
hardstatus on
hardstatus alwayslastline
hardstatus string "%{.bW}%-w%{.rW}%n %t%{-}%+w %=%{..G} %H %{..Y} %m/%d %c"
termcapinfo xterm 'bc@:bs@'
ignorecase on
maptimeout 0
vbell off
defutf8 on
defencoding utf8

Also running screen with the -U option doesn't help.

Best Answer

It's a apparently a known bug: No characters beyond the BMP are displayed, as screen apparently only has a two byte buffer for characters.

(It works in tmux).

Related Question