CentOS里Apache强制UTF-8乱码的解决


编辑Apache配置文件:

vi /etc/httpd/conf/httpd.conf

修改AddDefaultCharset UTF-8为:

AddDefaultCharset Off

 

深入分析:

默认的AddDefaultCharset UTF-8将影响Apache输入HTTP应答头中的Content-Type字段中的charset值:

Content-Type: text/html; charset=utf-8

改为AddDefaultCharset Off后,Conten-Type字段的值将仅为:

Content-Type: text/html


你可能感兴趣的:(CentOS里Apache强制UTF-8乱码的解决)