Phpgvim Chinese garbled analysis solution

Source: Internet
Author: User
Start to study the gvim configuration file (_ vimrc). now let's take a look at the configuration before I generate garbled characters. the meanings of enconding, fileeconding, and fileecondings in the configuration file are as follows:

Start to study the gvim configuration file (_ vimrc). now let's take a look at the configuration before I generate garbled characters. the meanings of enconding, fileeconding, and fileecondings in the configuration file are as follows:

Encoding: the character encoding method used inside gvim, including vim buffer, menu text, and message text.

In the user manual, it is recommended to change its value only in. vimrc. In fact, it seems only meaningful to change its value in. vimrc.

Fileencoding: the character encoding method of the file currently edited in gvim. when saving the file, vim also saves the file as this encoding method (whether new or not ).

Fileencodings: when gvim is started, it detects the character encoding methods of the files to be opened one by one based on the character encoding methods listed in it, and sets fileencoding as the final character encoding method.

Therefore, it is best to put the unicode encoding method at the beginning of this list, and put latin1 in the latin1.

Here: chinese is the cp963 encoding. I suddenly remembered that the default character set in my browser is gbk, and the encoding set in _ vimrc is UTF-8, which does not correspond to each other.

  1. Colors desert
  2. Set nobackup
  3. Set guifont = courier_new: h12: cansi
  4. "Garbled characters are displayed in the processed text.
  5. Set encoding = UTF-8
  6. Set fileencodings = chinese
  7. Set fileencoding = chinese
  8. "Process menu and context menu garbled characters
  9. Source $ vimruntime/delmenu. vim
  10. Source $ vimruntime/menu. vim
  11. "Handling consystemic output garbled characters
  12. Language messages zh_cn.utf-8
  13. Syntax enable
  14. Syntax on

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.