Bug 442087 - Usage of AddDefaultCharset in httpd.conf overrides document encoding
Usage of AddDefaultCharset in httpd.conf overrides document encoding
Product: Fedora
Classification: Fedora
Component: httpd (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Joe Orton
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-04-11 13:03 EDT by Kostas Georgiou
Modified: 2009-02-23 12:20 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-02-23 09:05:18 EST
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:03:24 EDT
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 Bug Zapper 2008-05-14 05:19:12 EDT
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
Comment 2 Marek Greško 2009-02-06 12:52:05 EST
This is not a bug. AddDefaultCharset just adds default charset to HTTP header. The meta tag in html file is just the information, it is not the instruction. You should set correct HTTP header.
Comment 3 Kostas Georgiou 2009-02-06 20:26:26 EST
A user can not affect the HTTP header, their html can have an encoding but as it is it's ignored because apache is forcing utf8 upong them.
Comment 4 Marek Greško 2009-02-09 07:35:16 EST
A user can. If you rename file index.html to index.html.iso8859-2 Apache adds header including corresponding charset (in this case iso-8859-2) instead of default one. When using php, or other languages, there are possibilities to add header. You should do it before any output.

Alternatively the user can change default charset in the .htaccess.
Comment 5 Joe Orton 2009-02-23 09:05:18 EST
I agree with everything Marek has said.
Comment 6 Kostas Georgiou 2009-02-23 12:20:08 EST
I am not disagreeing with what Marek said but you can not really expect end users to add encoding suffixes or know how to edit a .htaccess file. Users expect to be able to specify an encoding in a html file and not having the server overriding

Is there a *reason* why we differentiate from upstream and we force an encoding?

Anyway I'll leave the bug closed, I can always fix it locally....

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