git clone source code is garbled when Vim is opened

Source: Internet
Author: User

Cause: Yesterday, from the GitHub clone source, some of the Readme.txt files were garbled when Vim was turned on. Find the answer on the Internet, it is said that the Linux character set and Windows character set incompatibility caused by the problem is not GitHub or vim. But without providing a solution, I have nothing to do with it.

Looking at how to determine the character set of a file today, I suddenly see this blog post: http://jayli.github.io/blog/data/2010/03/15/vimencode.html

It explains some of the vim file coding knowledge mentioned fileencodings, simply put vim decoding set up a collection

Set FILEENCODINGS=UCS-BOM,UTF-,GB18030,GBK

This solves the problem of clone source code programming garbled, but there is still a problem is that the termencoding option can not be set to a collection in order to match the decoding, resulting in the direct cat clone source TXT file to the terminal will still be garbled, the problem persists this bar, Maybe one day the answer will pop out.

Hope to have some help for the people who need it.

git clone source code is garbled when Vim is opened

Related Article

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.