Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

1 Answer

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
747c747
< AddDefaultCharset UTF-8
---
> #AddDefaultCharset UTF-8
[root@cbdb conf]# service httpd restart
share|improve this answer
add comment

Your Answer

 
discard

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.