3

I'm using powerline-shell as my bash's PS1. But as you can see in the screenshot, the unicode characters aren't displayed correctly:

screenshot

How do I make unicode characters be printed correctly in Bash?

Edit:

$ locale
LANG=en_US.UTF-8
LANGUAGE=en_US
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=en_US.UTF-8
LC_TIME=en_US.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=en_US.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=en_US.UTF-8
LC_NAME=en_US.UTF-8
LC_ADDRESS=en_US.UTF-8
LC_TELEPHONE=en_US.UTF-8
LC_MEASUREMENT=en_US.UTF-8
LC_IDENTIFICATION=en_US.UTF-8
LC_ALL=
  • 1
    Which characters don't render correctly? What do you expect to see? – tripleee Nov 30 '15 at 20:21
  • @tripleee - Here are some of the characters it's trying to display - '\uE0A2', '\uE0B0', '\uE0B1' – speller Dec 1 '15 at 9:26
3

The instructions mention that you need to patch your console font, which apparently you have not done (successfully); or perhaps you have failed to set up your terminal to use one of the patched fonts.

Since your question fails to mention anything about this, I think it's safe to assume that you simply missed this part of the instructions.

According to your comment, the characters which are displaying incorrectly are e.g. U+E0A2, U+E0B0, and U+E0B1. But those are "private use area" characters, so they don't have any universal meaning. There is no "correct" or "incorrect" here as far as Unicode is concerned, just lack of standardization.

0

Try install fonts-powerline first

sudo apt install fonts-powerline

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.