Problem description in CentOS system using Apache server install GBK encoding program garbled, this is mainly because the default installation of Apache server character encoding for UTF-8, if the GBK program does not force encoding, garbled characters are generated. Solution: 1. open the Apache configuration file httpd. conf, for example,/etc/httpd/conf/httpd. conf # vi/etc/httpd/conf/httpd. c by default.
Problem description in CentOS system using Apache server install GBK encoding program garbled, this is mainly because the default installation of Apache server character encoding for UTF-8, if the GBK program does not force encoding, garbled characters are generated.
Solution:
1. open the Apache configuration file httpd. conf, for example,/etc/httpd/conf/httpd. conf by default.
# Vi/etc/httpd/conf/httpd. conf
2. find the adddefacharcharset configuration item
Adddefacharcharset UTF-8
3. modify the adddefacharcharset configuration and disable the configuration characters as follows:
Adddefacharcharset Off
4. you can also set the default Apache encoding to GB2312 as follows:
Adddefacharcharset GB2312