Website garbled how to force display as Chinese

Source: Internet
Author: User

<meta Http-equiv=content-type content=text/html;charset=gb2312> This sentence should be familiar, it means to force the browser encoding is set to Simplified Chinese (GB2312). The role of this sentence is quite critical, in the process of making Web pages must not be omitted . It can be added to any part of the page, preferably between

In the past, omitted <meta http-equiv=content-type content=text/html;charset=gb2312> This page also often can display normally. But now WindowsXP's IE6.0 supports Simplified Chinese (GB18030), which uses 1/2/4 bytes hybrid encoding, but it is not fully compatible with GB2312.
If the page omitted <meta http-equiv=content-type content=text/html;charset=gb2312> This sentence, WinXP browser will default to GB18030, the Web page will appear some garbled.

Note that the <meta http-equiv=content-type content=text/html;charset=gb2312> This sentence can not be written in the JS file, otherwise it does not work, the browser encoding will default to GB18030.

But the style sheet statement can be written in the JS file, except the <meta> statement cannot be.

Why is the Web page stored in foreign space will be garbled?
Because your webpage does not join <meta Http-equiv=content-type content=text/html;charset=gb2312> This sentence, please add it in the Web source code, preferably add in When you visit a foreign website, the code of the browser may default to the language of the foreign website, a little "memory effect" meaning.

Website garbled how to force display as Chinese

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.