How to fix PuTTY showing garbled characters? [closed]
Connecting from a Windows 7 PC via SSH to an Ubuntu server using PuTTY, I get some screen errors:
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?
Solution 1:
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.
You may need to tweak the line drawing setting as well, but it is probably not likely.
Solution 2:
I had an issue with Debian's aptitude
program even though I had UTF-8 as my characters set. What worked for me was to set the 'Connection > Data > 'Terminal-type string' to 'putty' instead of 'xterm' - apparently Putty ignores the character sequence to switch into drawing mode: http://www.chiark.greenend.org.uk/~sgtatham/putty/wishlist/utf8-plus-vt100.html
Solution 3:
After 15 years I got annoyed once more and googled around again, found this, chose
change settings → window → translation → remote char set → "use font encoding"
and that fixed it.