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:
even when run in UTF-8 mode with screen -U
Any idea how to solve this problem?
Go to the language settings, click Administrative language settings, then Change system localeโฆ and tick the Beta: Use Unicode UTF-8 for worldwide language support option.
The Difference Between Unicode and UTF-8Unicode is a character set. UTF-8 is encoding. Unicode is a list of characters with unique decimal numbers (code points).
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With