Red Hat Bugzilla – Bug 442089
Usage of AddDefaultCharset in httpd.conf overrides document encoding
Last modified: 2008-04-23 04:55:27 EDT
+++ This bug was initially created as a clone of Bug #442087 +++
The httpd.conf provided uses AddDefaultCharset UTF-8, unfortunately this
overrides what ever the html document specifies in it's meta which makes it
impossible to have documents in different encodings in the same server.
For more info have a look at the upstream bug:
You can certainly have documents in different charsets on the same server, e.g.
by specifying a different AddDefaultCharset in a <Directory ..> context, or an
.htaccess file, or using by AddCharset.
UTF-8 is the default character set for everything in the distribution; all tools
will produce UTF-8 output by default; so even in light of the argument upstream,
I still think that it is correct to set the default character set to UTF-8 in
the distribution httpd.conf.
You can change the settings on a per directory basis indeed, in practice you'll
get a blank stare from most users if you start telling them about encodings and
how to use .htaccess. They just want to drop documents in public_html that they
created with god knows what, more often than not they have different encodings
in the same dir as well :(
In any case the fix is simple once you are aware that apache is overriding the
documents Content-Type (AddDefaultCharset Off) so it's not a big deal.