Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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)?

share|improve this question
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. –  Herman Torjussen Jan 27 '13 at 17:29

1 Answer 1

up vote 0 down vote accepted

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:

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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