I have a unicode file that contains Chinese characters. I have a local and a remote copy of it.
When I use less
on the local file the characters are shown properly:
奥尔德林
However, when I ssh
to the remote machine and look at the remote version of the same file the characters are just shown like this instead:
<E5><A5><A5><E5><B0><94><E5><BE><B7><E6><9E><97>
How can I properly view the remote unicode file (when connected via ssh
)?
(I'm using the standard terminal application on Mac OS.)
Does the file display correctly if you
cat
it (or usedhead
to shorten the output)?I think the key to making
less
display the file properly lies in settingLANG
orLC_ALL
properly. On your local system and the remote system compare the values of those variables and see if they are different and whether changing the remote one to match makes a difference.From the
less
man page (Note the last sentence):