3

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.

4
  • Welcome to Ask Ubuntu. Please edit your question and add some more information. Which version of Ubuntu are you using? Is the problem with nano only while you ssh or do you have the same problem if you locally login to this computer? Does the same problem happen if you ssh from another Ubuntu computer?
    – user68186
    Aug 21, 2018 at 21:11
  • Hello, how do you install the language pack? Maybe some locale are not set correctly. What is the output of the command locale? Please review these references: [1] Ubuntu Docs: Locale; [2] Ubuntu Docs: LocaleConf; [3] Configure Locales in Ubuntu.
    – pa4080
    Aug 21, 2018 at 21:30
  • Unfortunately Debian is off-topic here. Whatever try to run nano in the following way: LANG=zh_CN.gb2312 nano..
    – pa4080
    Aug 21, 2018 at 21:58
  • I tried to the command and still the same, the thing is, this server is for making patches for automated updates, and since the paths are not shown correctly, the ingame result is devastating. Aug 21, 2018 at 22:08

0

Browse other questions tagged .