Vim opens the file with Chinese garbled characters
Solution
- Edit the ~/.vimrc file (create it manually if it doesn’t exist) and add the following lines
set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
set termencoding=utf-8
set encoding=utf-8