Quick Tip: Fix Garbled Characters, PuTTy Connection to Remote Ubuntu host

If you’re using PuTTY to connect to a remoter computer, Ubuntu for example, you need to set your “Remote Character Set” correctly. Otherwise, it’s possible that your output will show garbled characters. Let me show you how.

Basically, you need to make sure that the “Remote Character Set” in your PuTTy configuration is setup to match the remote computer. In this example, I’m using Ubuntu 12.04 on the remote computer. So let’s start there. At the command line on your Ubuntu computer, type the following command and take note of the LANG setting:

locale

The output will look something like this:

locale

Notice that it says, UTF-8. Your output may say something different. Just remember what it is, because we’ll be using it in the next few steps.

  • Run PuTTY
  • Select Window->Translation
  • Change “Remote Character Set” in the dropdown box to match what you found earlier (UTF-8 in my example)
  • Select Session
  • Save the settings

remoteCharacterSet

And that’s it.