terminal + ssh doesn't display UTF correctly
I have a remote server, to which I connect via SSH.
On separate Mac OS and Gentoo computers, when I connect to this server, unicode works fine. On my brand new Ubuntu installation, I don't see unicode on this server correctly and I can't seem to insert them correctly either.
I have a file with a letter "ž". When I less
it locally, on Ubuntu, in Terminal, I see correct "ž". When I less
the same file on the aforementioned server via SSH, I see just <C5><BE>
- both in Terminal and xterm
.
locale
on the server shows me this
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=cs_CZ.UTF-8
LC_TIME=cs_CZ.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=cs_CZ.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=cs_CZ.UTF-8
LC_NAME=cs_CZ.UTF-8
LC_ADDRESS=cs_CZ.UTF-8
LC_TELEPHONE=cs_CZ.UTF-8
LC_MEASUREMENT=cs_CZ.UTF-8
LC_IDENTIFICATION=cs_CZ.UTF-8
LC_ALL=
Terminal has UTF8 encoding (and as I wrote, the unicode file is opened correctly when opened locally).
What can be wrong?
This answer to a similar question helped
https://askubuntu.com/a/144448/9685
Commenting out SendEnv LANG LC_*
in the local /etc/ssh/ssh_config
file fixed everything.