2

How can I make my terminal(bash) window uft-8, that it can show utf-8 characters?

my operating system is : ubuntu 12.04 my desktop : gnome-shell

How about native shell(outside of desktop)?

  • 2
    I would be very surprised if, in a normal install of any version of Ubuntu, it wasn't already UTF-8. What is the output of locale -c charmap? If it says LC_CTYPE and UTF-8 you should be already good. If not, you need to set your locale to something (like en_US.UTF-8) that uses UTF-8 – Celada Jan 27 '13 at 17:17
  • 1
    - what is the terminal emulator? - what are the current locales? (output of locale -a) – njsg Jan 27 '13 at 17:18
  • 1
    Duplicate of this question. – user13742 Jan 27 '13 at 17:29
1

In Bash for example you can use UTF-8 like this:

echo $'\xe2\x95\xb1'

which prints this:

Or you can use Unicode characters like this:

echo -e "\U2571"

which prints this:

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.