This method solves my Windows Gvim Chinese garbled problem (share with you),
This method references http://www.douban.com/note/145491549/
To view the encoding of a file:
: Echo &fileencoding
Vim has four options related to character encoding, encoding, fileencoding, Fileencodings, termencoding (the possible values for these options can be found in the VIM online assistance: Help Encoding-names), They have the following meanings:
Encoding:vim the character encoding used internally, including the buffer of Vim, menu text, message text, and so on.
Fileencoding:vim the character encoding of the currently edited file, Vim saves the file as a character encoding (regardless of whether the new file is the same).
Fileencodings:vim starts by detecting the character encoding of the file to be opened by the character encoding it lists, and fileencoding is set to the final detected character encoding. It is therefore best to place Unicode encoding at the top of this list, Latin1 Latin encoding to the last side.
The character encoding of the terminal (or the Console window of Windows) that the Termencoding:vim is working on. This option is not valid for the gVim of our common GUI mode under Windows, and for Vim of the console mode is the code page of the Windows console, and usually we do not need to change it.
It is best to use the English menu and tips, you can avoid the menu and prompt information (b,c section) of the settings
If you are using the English menu and prompts when installing Gvim, remove the option to support the local language.
Solve the Vim file garbled, open file garbled, menu, message garbled:
There are four options related to character encoding, encoding, fileencoding, Fileencodings, termencoding
Modified in Linux. VIMRC (in Win is _VIMRC)
The Windows system can also be used in vim menu items: Edit > Launch settings, open the _VIMRC file directly
A, "Set the code form for the file
Set Encoding=utf-8
Set Termencoding=utf-8
Set Fileencoding=utf-8
Set fileencodings=ucs-bom,utf-8,chinese,cp936
B, "Vim's menu garbled solution:
Also in the _VIMRC file, add the following command after the Chinese setting
SOURCE $VIMRUNTIME/delmenu.vim
SOURCE $VIMRUNTIME/menu.vim
C, "vim message garbled solution
Language Messages Zh_cn.utf-8