Set up Putty and Server to only use UTF-8

0

2

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

Martin

Posted 2012-05-15T23:54:09.230

Reputation: 945

$LANG contains...? – Ignacio Vazquez-Abrams – 2012-05-15T23:57:21.977

Answers

3

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.

Celada

Posted 2012-05-15T23:54:09.230

Reputation: 2 120

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 – 2012-05-16T01:04:34.923