Bug 442089

Summary: Usage of AddDefaultCharset in httpd.conf overrides document encoding
Product: Red Hat Enterprise Linux 5 Reporter: Kostas Georgiou <k.georgiou>
Component: httpdAssignee: Joe Orton <jorton>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: 5.1   
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-04-22 09:36:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Kostas Georgiou 2008-04-11 17:14:51 UTC
+++ 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:
https://issues.apache.org/bugzilla/show_bug.cgi?id=23421

Comment 1 Joe Orton 2008-04-22 09:36:11 UTC
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 08:55:27 UTC
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.