Garbled character in Vim

Quote from http://vimdoc.sourceforge.net/htmldoc/options.html

Vim has four coding methods.

1.encoding(enc)

2.fileencoding(fenc)

3.fileencodings(fencs)

4.termencoding(temc)


Add text below the double quotes line  into your .vimrc if you use windows.

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

" set default code
set fenc=utf-8

"the gb18030 include gb18030,gbk,gb2312, cp936=gbk
set fencs=utf-8,usc-bom,euc-jp,gb18030,gbk,gb2312,cp936,big5
set encoding=utf-8
set fileencodings=utf-8,chinese,latin-1
if has("win32")
set fileencoding=chinese
else
set fileencoding=utf-8
endif
" garbled menu
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim
" grabled  console 
language messages zh_CN.utf-8

你可能感兴趣的:(vim,character,include,encoding)