3

The following is a line from the the mysql man page when accessed from my computer running ubuntu with the gnome gui

"Command-Line Options that Affect Option-File Handling".

This line gets rendered as this:

âCommand-Line Options that Affect Option-File Handlingâ

when I ssh into the ubuntu computer from my windows computer using putty.

Why are the quotes being rendered as â's? Is there any way I can get my ssh sessions to correctly render the man pages?

EDIT

Putty already has the "Terminal-type String" set to xterm, here is my .profile:

# if running bash
if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f "$HOME/.bashrc" ]; then
        . "$HOME/.bashrc"
    fi
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi

I don't think that the terminal type is being overridden

user784637
  • 1,542
  • 7
  • 35
  • 52

2 Answers2

6

Change your character set in PuTTY:

Window > Translation > Remote character set

  • The default character set is ISO-8859-1:1998 (Latin-1, West Europe)
  • Change it to UTF-8 for unicode support - which should render your characters correctly.

(I had this same problem with Amazon's Linux - the motd message had unicode characters, so it was a constant reminder and prompted me to hunt for a solution).

cyberx86
  • 20,805
  • 1
  • 62
  • 81
5

Under either Connection or Connection->Data (depending on your version of PuTTY), you will see an entry "Terminal-type String". Try setting it to xterm.

Note that if your current user profile on the machine you are connecting to overrides your terminal type, you'll have to change it there. Look in your home directory for files that start with . and have profile in their name. (You can use ls -a ~/.*profile* to check.)

Note: Exercise extreme caution editing profile files. I recommend keeping one session logged in to revert any changes and confirming that you can log in a new session before logging out.

David Schwartz
  • 31,449
  • 2
  • 55
  • 84