How to set support UTF8 encoding in CMD in Windows

Source: Internet
Author: User

This problem many people will not know at the beginning, of course, including once I, when used, had to resort to the great groove and Niang. There is a way to set up online, but say clearly enough detailed system, say set font for: Lucida Console. The problem is, in the default mode, only the dot matrix font, which has what Lucida Console. So, after your own successful setup, take out and share the next process, let us find out the Lucida console to set it.

Here's what you need to know first:

CHCP

CHCP is a command in MD dos to display or set the active code page number. Usage is:

CHCP [nnn]

Where nnn specifies the number of the code page. This parameter is optional, and if you do not specify this code page number at the command line, the default is to display the current code page number. For example, in the default CMD window, we enter CHCP, which will appear similar to the following:

Active code page: 936

The 936 here means that the Simplified Chinese (GB2312) encoding is currently in use.

UTF8

You also need to understand some of the coding knowledge, in order to complete support UTF8 work, you need to know at least UTF8 code page number: 65001. More about the content of the code, do not repeat here, please find the relevant content.

With these two points of knowledge, the next step is to make it easier for CMD to support UTF8.

1. Run cmd;

2. Input CHCP, enter to view the current encoding;

3. Input chcp 65001, enter;

4. Only this, still cannot support the normal display of UTF8, you also need to right-click on the form, select Properties, to set the font;

5. After the steps above, even if your original font does not display the Lucida console this font, it should now be seen. Select it. If you have, you can choose it first try, not in the above steps (add: at least I need to chcp 65001, a friend said no);

6. Select Apply only to this form, confirm.

At this time, your console should support UTF8.

Some friends also want to know how to display more fonts in cmd, this is actually a way to do so as long as the registry (path: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Nt\currentversion\ Console\truetypefont). It is important to note that the added font needs to be fixed width (fixed-width). Operation:

From here (in English). Need to be directly accessible.

From:http://blog.useasp.net/archive/2012/04/24/how_to_use_utf8_encoding_in_windows_cmd.aspx

Users share

How to set support UTF8 encoding in CMD in Windows

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.