The solution to the Chinese garbled problem of Apache __ garbled problem

Source: Internet
Author: User
Tags browser cache

I don't remember how many times I've solved this problem, but I forget it every time.

Server side:
Modify httpd.conf (place in Redhat is/etc/httpd/conf/)
Adddefaultcharset iso-8859-1
Change into:
#AddDefaultCharset iso-8859-1
Adddefaultcharset off

This way, the default language of the server is turned off so that the language of the Web page is determined only by the language set in the header of the HTML file.

Someone used it directly.

Adddefaultcharset GB2312

However, this is not recommended.

Restart Apache,

/etc/init.d/httpd Restart

In the Chinese Web page please add in the label as follows:
GB2312 (Simplified Chinese):
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312″/>
BIG5 (Traditional Chinese):
<meta http-equiv= "Content-type" content= "text/html; charset=Big5″/>
UTF-8: (note is UTF-8, not UTF8)
<meta http-equiv= "Content-type" content= "text/html; charset=utf-8″/>

If it is still not normal, please clear the browser cache try.

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: 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.