Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 0 down vote accepted

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
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.