HTML5 UTF-8 Chinese garbled Solution

Source: Internet
Author: User

Comments: HTML5 UTF-8 appear Chinese garbled, there should be a lot of friends have encountered it, write with notepad, save after running in the web page appeared garbled, changed to GB2312 can correctly display Chinese, the following describes how to solve the problem.


The Code is as follows:
<! DOCTYPE html>
<Html>
<Head>
<Meta charset = "UTF-8">
<Title> HTML5 title </title>
</Head>
<Body>
<P> HTML5 content! Hello </p>
</Body>
</Html>

Write in notepad, save and run garbled characters on the webpage, and change to GB2312 to correctly display Chinese characters.

If there is no problem with the code, go to the notepad. <Meta charste = "UTF-8"> it only tells the browser to use UTF-8 for explanation, while the encoding of the document is determined by your selection during storage. If you save ANSI and then use UTF-8 for explanation, it must be garbled, notepad, the default save file format is ANSI, so when saving to modify to uif-8.


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.