Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to only use UTF-8 for anything (Client on Win7 64 bit, servers Debian 64bit, su rights for everything). On Stackoverflow I can find many solutions to fix vim for UTF-8 handling. I also have no trouble with my apps iusing PHP and MySQL to only use UTF-8.

But in Putty, as soon as I set "Remote character set" to UTF-8, the terminal output of special chars gets messed up.

On a new server /etc/locale.gen looks as follows:

de_DE ISO-8859-1
de_DE.UTF-8 UTF-8
de_DE.UTF-8@euro UTF-8
de_DE@euro ISO-8859-15

Question: How can I restrict the system to only use utf-8 for everything?

Do I still have to tell every app to use utf-8 individually (eg. vim, mutt, aptitude etc.)?

share|improve this question

migrated from stackoverflow.com May 16 '12 at 0:05

This question came from our site for professional and enthusiast programmers.

    
$LANG contains...? –  Ignacio Vazquez-Abrams May 15 '12 at 23:57

1 Answer 1

up vote 3 down vote accepted

Note that /etc/locale.gen only says which locales to make available. It doesn't say which one your session will use as the default. For that, check /etc/default/locale since you are on Debian, or better yet, configure all of this with dpkg-reconfigure locales.

To check which locale your session is using, type locale. $LC_CTYPE overrides $LANG and $LC_ALL overrides everything.

share|improve this answer
    
Ok, thank you very much. Just for the record, probably obvious for experienced users: simply editing /etc/default/locale or running dpk-reconfigure does not suffice. The user has to make sure to completely end all bash shells before restarting the SSH connection. Now, vim works well and most of the special characters in aptitude are ok (but not all). –  Martin May 16 '12 at 1:04

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.