Tonight with the Ubuntu 12.04 vim to edit the page code, found that the above Chinese display garbled. This HTML file is I previously edited with Gedit, in gedit inside display normal, but in vim under the display is garbled.
How to solve the problem of vim display Chinese garbled in Ubuntu? First, add the Chinese character encoding: sudo gedit/var/lib/locales/supported.d/local in the open file to add the following ZH_CN. GBK GBK ZH_CN. GB2312 GB2312 ZH_CN. GB18030 GB18030 then enter the following command to make it effective: sudo dpkg-reconfigure locales next is to modify the vim configuration file sudo gedit/etc/vim/vimrc add the set Fileencodin in the back gs=utf-8,gb2312,gbk,gb18030 set Termencoding=utf-8 set ENCODING=PRC after saving, re-open vim will be able to display the normal Chinese.
Ubuntu in the use of vim to open txt and other documents Chinese display garbled solution