I have a problem with text encoding on files. I use Putty to connect trough SSH, I have installed the chinese language pack correctly - zh_CN.gb2312
(Chinese Simplified), in the terminal using commands as ls
or dir
, I can see the names of the folder/files in chinese perfectly. I can enter the folder and open files using the chinese characters, but when I use nano
on these files, the chinese inside shows are squares.
I tried all the Character set translations from the Window tab in Putty Reconfiguration, but none worked.
Please help, thank you!
Edit: Forgot to mention, I am using Debian 8 64bit (someone sent me here for answers, don't know if its meant only for Ubuntu, but I know these 2 unix are pretty similar) I have remote access to the server. I connect from my PC with Windows 7 and the problem is only trough ssh, I connect with WinSCP as well and when I open the files, it shows the chinese language correctly.
root@updates:~# locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_COLLATE="de_DE.UTF-8"
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="de_DE.UTF-8"
LC_PAPER="de_DE.UTF-8"
LC_NAME="de_DE.UTF-8"
LC_ADDRESS="de_DE.UTF-8"
LC_TELEPHONE="de_DE.UTF-8"
LC_MEASUREMENT="de_DE.UTF-8"
LC_IDENTIFICATION="de_DE.UTF-8"
LC_ALL=de_DE.UTF-8
I tried as well the command export LANG=zh_CN.gb2312
, still can't see the Chinese characters when using nano
.
nano
only while youssh
or do you have the same problem if you locally login to this computer? Does the same problem happen if youssh
from another Ubuntu computer?locale
? Please review these references: [1] Ubuntu Docs: Locale; [2] Ubuntu Docs: LocaleConf; [3] Configure Locales in Ubuntu.LANG=zh_CN.gb2312 nano
..