Bug 442087 - Usage of AddDefaultCharset in httpd.conf overrides document encoding
Summary: Usage of AddDefaultCharset in httpd.conf overrides document encoding
Alias: None
Product: Fedora
Classification: Fedora
Component: httpd
Version: 9
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Joe Orton
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2008-04-11 17:03 UTC by Kostas Georgiou
Modified: 2009-02-23 17:20 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2009-02-23 14:05:18 UTC

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Apache Bugzilla 23421 None None None Never

Description Kostas Georgiou 2008-04-11 17:03:24 UTC
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 09:19:12 UTC
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 17:52:05 UTC
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-07 01:26:26 UTC
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 12:35:16 UTC
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 14:05:18 UTC
I agree with everything Marek has said.

Comment 6 Kostas Georgiou 2009-02-23 17:20:08 UTC
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.