Two methods to solve Chinese garbled characters on the web page of apacheWeb Server

Source: Internet
Author: User
Two methods to solve the problem of garbled Chinese characters on the web page of apacheWeb server-Linux Enterprise Application-Linux server application information. The following is a detailed description. Solution to apache Web Server webpage display garbled characters
Author: Wang xueming time:
Home: http://www.ahjixi.com/

One of the solutions:
(1) Add


In the APACHE httpd. conf configuration file, change adddefacharcharset ISO-8859-1 to adddefacharcharset off.

Solution 2:
Change the adddefadefacharset ISO-8859-1
Adddefacharcharset GB2312. ZH-CN. zh-cn
Both methods can solve the problem of garbled characters on the apache Web Server webpage. The second method is the best and easiest, and is used once and for all.
[OK! Come on, comrade. : Lol:]

Xieweihua replied to: 08:21:18
The summary is still acceptable. Support


HonestQiao replied to: 08:39:51
It prompts you that method 1 is not a solution, but an element that must be included in a regular webpage.


Reply to leopardnj: 10:54:53
I replace the original one with the following:
Adddefacharcharset GB2312. ZH-CN. zh-cn

However, measures are reported at startup.

Start httpd: Syntax error on line 766 of/etc/httpd/conf/httpd. conf:
Adddefacharcharset takes one argument, The name of the default charset to add
Any Content-Type without one or 'off' to disable
[Failed]


Why


HonestQiao replied to: 13:29:30
Adddefacharcharset takes one argument

Isn't this prompt clearly explained? I want to translate it for you. /

AddDefaultCharset requires a parameter
Adddefacharcharset takes one argument


Reply to leopardnj: 14:42:43
I don't know. Is there a parameter? GB2312 ZH-CN. zh-cn
I am a beginner.
Thank you for your advice.


Aspbiz replied to: 16:41:23
Adddefacharcharset off


Level reply: 20:38:35
Adddefacharcharset gb2312
You can,
Of course, it is best
Adddefacharcharset off
This is highly flexible.


Reply to leopardnj: 11:07:46
Thank you !!! :)


Abel replied to: 04:08:52
If yes ?? M ?? Environment? Is it best?
Ex:
Php. ini
CGI. pm
Zhongdu ??? С Charset, often used people know how to solve, not often encountered ,? In httpd. conf
Searching for half a day


Shanyu replied to: 09:14:28
The simplest way is to comment out AddDefaultCharset.


Wingger replied to: 13:36:20
[Quote: baa57582cf = "abel"] If yes ?? M ?? Environment? Is it best?
Ex:
Php. ini
CGI. pm
Zhongdu ??? С Charset, often used people know how to solve, not often encountered ,? In httpd. conf
Looking for half a day [/quote: baa57582cf]

Http://bbs.chinaunix.net/forum/viewtopic.php? T = 381406
Let's see how it works.
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.