What should I do if I use vim to enable Chinese garbled characters?

Source: Internet
Author: User
Php Chinese network (www.php.cn) provides the most comprehensive basic tutorial on programming technology, introducing HTML, CSS, Javascript, Python, Java, Ruby, C, PHP, basic knowledge of MySQL and other programming languages. At the same time, this site also provides a large number of online instances, through which you can better learn programming... Reply content: In general, you only need to correctly set the vim encoding and recognition sequence, and rarely encounter garbled characters:

Set fileencodings = ucs-bom, UTF-8, UTF-16, gbk, big5, gb18030, latin1
After seeing this, I opened my local vimrc and posted it to you. it has been used for two years and has not encountered any garbled code.
Set fileencodings = UTF-8, gb2312, gb18030, gbk, ucs-bom, cp936, latin1 can be considered for encoding: e ++ enc = UTF-8 myfile.txt try the vim Chinese garbled solution in Debian:
1. set ~ Add fileencodings, enc, and fencs to the. vimrc file. the code is as follows:

Set fileencodings = UTF-8, gb2312, gb18030, gbk, ucs-bom, cp936, latin1set enc = utf8set fencs = utf8, gbk, gb2312, gb18030
Try to switch the font. it is usually because vim uses the Spanish font. replace the font with the simplified font.

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.