View utf8 text in Windows cmd

Source: Internet
Author: User
How to display UTF-8 characters in a DOS window

Author: Finan <li.zhongnan@hotmail.com>
In the Chinese Windows system, if a file contains 8 bytes, the file content cannot be correctly displayed in the cmd.exe command line window (the so-called DOS window. By defaultCodeThe page is Chinese or American, that is, the encoding is Chinese character set or Spanish character set.

If you want to correctly display UTF-8 characters, follow these steps:

1. Open the cmd.exe command line window

2. Use the chcp command to change the code page. The code page of The UTF-8 is 65001.

Chcp 65001

After this operation is performed, the code page is turned into a UTF-8. However, UTF-8 characters still cannot be correctly displayed in the window.

3. Modify window properties and font

Right-click the title bar of the command line, select "property"-> "font", change the font to "lucida console" of true type, and click "OK" to apply the property to the current window.

Then you can use the type command to display the content of the UTF-8 text file:

Type filename.txt

4. the above operations cannot completely solve the problem, because the displayed content may be incomplete. The command line window can be minimized first, and the file content is displayed completely.

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.