Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Connecting from a Windows 7 PC via SSH to an Ubuntu server using PuTTY, I get some screen errors:

enter image description here

I.e. it:

  • "Double-draws" the selection inside Midnight Commander (MC).
  • Other characters like line elements are drawn as the wrong characters (e.g. "â" instead of "|").

I connected to the same Ubuntu server with a terminal and SHH from a Mac OS X and do not get these screen garbling (i.e. everything looks and works correctly). I've already tried to play with the font settings inside PuTTY, changing it from Courier New to Consolas but without luck.

My question therefore is:

How to configure PuTTY to correctly display special characters and not double-draw/overwrite screen lines?

share|improve this question

3 Answers 3

up vote 13 down vote accepted

You almost certainly have set the wrong character set in your PuTTY settings.

Verify the character set on the remote system by running the command:

locale

This should return something like:

LANG=de_DE.UTF-8
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_COLLATE="de_DE.UTF-8"
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="de_DE.UTF-8"
LC_PAPER="de_DE.UTF-8"
LC_NAME="de_DE.UTF-8"
LC_ADDRESS="de_DE.UTF-8"
LC_TELEPHONE="de_DE.UTF-8"
LC_MEASUREMENT="de_DE.UTF-8"
LC_IDENTIFICATION="de_DE.UTF-8"
LC_ALL=

So check your PuTTY settings under Translation and ensure that you have UTF-8 set as the character set.

PuTTY Reconfiguration

You may need to tweak the line drawing setting as well, but it is probably not likely.

share|improve this answer
1  
That did the trick, thanks a lot, Michael! –  Uwe Keim Feb 6 '13 at 7:39
    
This is not sufficient in all cases. You should also export the following variable to your environment: NCURSES_NO_UTF8_ACS=1 [more info] –  Piotr Jurkiewicz Dec 14 at 22:53
    
And you thought that was worth downvoting? –  Michael Hampton Dec 15 at 4:51

In my case (Ubuntu 14.04) the issue was caused by missing

UsePAM yes    

entry in /etc/ssh/sshd_config as /etc/pam.d/sshd pam configuration is responsible by default for loading /etc/default/locale into users environment.

share|improve this answer

Also, if UTF-8 is not properly configured, you may run it as mc -ac.

Credits: http://blog.acsystem.sk/linux/midnight-commander-utf8-line-drawing-characters-problem

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.