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.

Running Centos 6.3. In gnome-terminal UTF-8 works, but only after I've chosen (the already chosen) UTF-8 encoding in gnome-terminal settings.

How do I force gnome-terminal to respect its own encoding setting?

share|improve this question
    
I don't know, but try urxvt instead of gnome-terminal. It is faster (the "r" is for reduced resources) and, as for your problem, the "u" is for Unicode :) –  Emanuel Berg Jan 7 '13 at 20:08
1  
Do you have a simple testcase anyone else can try? I suspect most people using CentOS 6 think their Gnome Terminal works just fine with Unicode. A good example would be a bit of text inserted into your question that, when pasted into a local file and catted, doesn't show up right. –  Warren Young Jan 8 '13 at 15:52
add comment

1 Answer

I had this exact problem. I fixed it by adding export LANG="en_GB.utf8" to ~/.bashrc and then logged out to restart my X window session.

Use locale -a | grep -i utf8 from the command-line to get a list of locales with UTF-8 support.

I think the problem is that Gnome Terminal will automatically disable UTF-8 support if it doesn't detect it in your locale environment variables.

share|improve this answer
add comment

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.