Bug 442089 - Usage of AddDefaultCharset in httpd.conf overrides document encoding
Usage of AddDefaultCharset in httpd.conf overrides document encoding
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: httpd (Show other bugs)
All Linux
low Severity medium
: rc
: ---
Assigned To: Joe Orton
Depends On:
  Show dependency treegraph
Reported: 2008-04-11 13:14 EDT by Kostas Georgiou
Modified: 2008-04-23 04:55 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-04-22 05:36:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Apache Bugzilla 23421 None None None Never

  None (edit)
Description Kostas Georgiou 2008-04-11 13:14:51 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:
Comment 1 Joe Orton 2008-04-22 05:36:11 EDT
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.
Comment 2 Kostas Georgiou 2008-04-23 04:55:27 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.