How to make GNU screen recognize UTF-8 characters

bash, gnu-screen, macos, unicode

Solution

1) In GNU screen type CTRL+A, then type this screen directive:

:utf8 on

(Not sure why -U does not already do it.)

2) Also check your locale by typing "locale -a" in a shell.

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

Problem

I like to have different prompts in bash to recognize quickly on which machine I am currently working when I use `ssh`. I found that the default bash terminal in OSX Yosemite accepts a wide range of unicode characters, so I set up 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, GNU screen does not understand UTF-8 characters: - F0 9F 98 BA http://unicode-table.com/fr/1F63A/ - F0 9F 98 88 http://unicode-table.com/fr/1F608/ even when run in UTF-8 mode with `screen -U` Any idea how to solve this problem?

Original source