61>> character encoding

Source: Internet
Author: User

Linux in the use of eNCA to view the encoding of the file, but sometimes error, if you want to confirm the file encoding, you can enter vim, the command line to enter the set encoding=gb2312 or other encoding method, the correct display of the document encoding the corresponding encoding.

CentOS gnome-terminal terminal in the default encoding is Utf-8, not normal display encoding is gb2312, GBK, gb18030 of Chinese characters, the use of Luit conversion encoding is not normal display. These three codes are Chinese local code, GBK is the extension to gb2312, GB18030 is the extension to GBK, and utf-8 incompatible, conversion must be converted to Unicode, and then converted to Utf-8,utf-8 converted to gb2312 also must be Unicode.

The character encoding setting options for VIM are:

Set encoding=utf-8 "format of files written by default

Set fileencodings=utf-8,gb2312,gbk,gb18030 "The order in which files are detected when viewing a file, without the default search for eternal Latin

Set Termencoding=utf-8 "The character encoding method of the terminal for VIM work

Specific view: http://www.cnblogs.com/freewater/archive/2011/08/26/2154602.html

After this setup, using Vim to edit the document containing Chinese characters can be displayed in the terminal normally, because they are all utf-8 encoded.

Document Encoding Conversions:

61>> character encoding

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.