First putty:open putty configuration Window -> appearance -> font settints->change... select NSimSun (新宋体)
Window -> Translation -> Character set ... select UTF-8
Save configuration to a session.
Next we setting up remote host:
put this in ~/.bashrc
Issue a "locale" and make sure LC_CTYPE is set correctly. If not do a "locale -a" and see what's available.
In Fedora or CentOS, just do a "yum install glibc-common" to install glibc-common to get all locales.
In Ubuntu, edit file /var/lib/locales/supported.d/local and add this line:
Then do a "dpkg-reconfigure locales".
That's it. Now we can edit UTF8 encoded Chinese file without problem.