Vim in the Chinese font of Windows is not good, so we need to adjust the font display code for UTF-8, only in order to use the beautiful Chinese. This time may appear many Chinese garbled. Such as: File display garbled, menu garbled, right key menu garbled, Conlse output garbled, file association right menu garbled and so on. Online a lot of solutions, but I tried a lot, there are some weird garbled, the other. There is a simple way to solve the garbled problem: delete vim under the lang directory. But so all menus can only be displayed in English. So I had to find a way. After a long time groping, summing up the following code can completely solve these problems.
"" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""
vim7.1 encoding settings under Windows. "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "
Fileencodings=utf-8,chinese,latin-1
If has ("Win32")
set Fileencoding=chinese
else
set Fileencoding=utf-8
endif
"resolve menu garbled
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim
"solve Consle output garbled
language messages Zh_cn.utf-8