Chinese are not displayed in vi / vim on Windows OS
Solution 1:
(1) Change your system locale into 'Chinese (simplified, PRC)'. Restart computer.
(2) Edit the file - C:\Program Files (x86)\Vim\_vimrc, and append the following code -
" 字符编码{{{
" Vim显示的编码(设置这个不会改变文件的编码){
if has('win32') || has('win64')
set encoding=utf-8
set termencoding=chinese
endif
" }
" 编辑已存在的文件时的参考文件编码.需要注意顺序,前面的字符集应该比后面的字符集大{
set fileencodings=ucs-bom,utf-8,cp936,gb18030,big5,euc-jp,euc-kr,latin1
" }
" }}}
Open your text file with gvim. You should be able to read Chinese now. Congratulations!
Solution 2: download WinVi from http://www.winvi.de/en/email.html . Chinese can be read in WinVi.
Solution 3: install Cygwin. Choose vim when installing Cygwin. Run Cygwin. Open your file with vim.
No comments:
Post a Comment