In migrating an Apache web site from RHEL 5 to CentOS 5 I noticed Chinese Traditional (Big 5) fonts look fine on the old site, but are garbled on the new site.

In Firefox, I can get the fonts to display properly by clicking View -> Character Encoding -> and changing "Unicode (UTF-8" to "Chinese Traditional (Big 5)".

How can I tell Apache to set the character encoding properly?

1 Answer 1


In a default CentOS 5.5 installation, Apache is configured with the AddDefaultCharset Directive set to "UTF-8". Commenting it out and restarting Apache fixed the problem:

[root@cbdb ~]# cd /etc/httpd/conf
[root@cbdb conf]# cp -a httpd.conf httpd.conf.orig
[root@cbdb conf]# vi httpd.conf
[root@cbdb conf]# diff httpd.conf.orig httpd.conf
< AddDefaultCharset UTF-8
> #AddDefaultCharset UTF-8
[root@cbdb conf]# service httpd restart

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .