Home » Questions » Computers [ Ask a new question ]

How do I connect from a utf-8 client to a latin1 server over ssh?

How do I connect from a utf-8 client to a latin1 server over ssh?

I have a fresh Ubuntu install and I want to connect over ssh in a gnome-terminal. The server uses latin1 (All files etc. are latin1), so I want to use that in the session. I have changed the charset in the menu-option so that characters are output correctly to my screen, but I can't input non-ascii correctly. Should I pass some magic arguments to ssh or is there a setting in gnome-terminal, or should I use stty? I'm a bit lost.

Asked by: Guest | Views: 336
Total answers/comments: 1
bert [Entry]

"The problem most likely has to do with readline, which bash uses. Put the following in either /etc/inputrc or ~/.inputrc:

set meta-flag on
set output-meta on
set convert-meta off

meta-flag enables eight-bit input (that is, it will not clear the eighth bit in the characters it reads), regardless of what the terminal claims it can support. output-meta will enable the display of characters with the eighth bit set directly rather than as a meta-prefixed escape sequence. When convert-meta is on, readline converts characters with the eighth bit set to an ASCII key sequence by stripping the eighth bit and prefixing it with an escape character (in effect, using escape as the meta prefix). We turn it off. Do man readline for more information about these and other variables."