Bugs item #1959206, was opened at 2008-05-07 04:00
Message generated for change (Comment added) made by gingerdog
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=937964&aid=1959206&group_id=191583
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: SVN (please specify revision!)
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Odd Henriksen (oddhenriksen)
Assigned to: Nobody/Anonymous (nobody)
Summary: UTF-8 encoding not defined in HTTP response header
Initial Comment:
(Note: I was unsure of what category to assign this ticket to, considering that "interface" may mean other things than user/web interface, and I didn't feel comfortable assigning it to the "core" category)
After recently having spent some time with translations, I realized that my browser displayed the Postfix Admin site in ISO-8859-1 encoding. This obviously made national characters look gibberish.
I investigated the issue further, and noticed that the web server sent the following header in the HTTP response:
"Content-Type: text/html; charset=ISO-8859-1"
The translations are UTF-8 encoded, and the meta tag in the Postfix Admin template file also specifies charset UTF-8.
The cause of this issue, is that my Apache web server is configured with a default charset of ISO-8859-1, and Postfix Admin does not explicitly specify charset UTF-8 in the HTTP response. The default charset setting is quite commonly used, and is recommended by Apache.
The Apache configuration setting I'm referring to, is the following (I've included the comments for informational purposes):
# Specify a default charset for all pages sent out. This is
# always a good idea and opens the door for future internationalisation
# of your web site, should you ever want it. Specifying it as
# a default does little harm; as the standard dictates that a page
# is in iso-8859-1 (latin1) unless specified otherwise i.e. you
# are merely stating the obvious. There are also some security
# reasons in browsers, related to javascript and URL parsing
# which encourage you to always set a default char set.
#
AddDefaultCharset ISO-8859-1
I have successfully solved this issue by adding an additional header() command in templates/header.php.
I have attached a patch file (diff) for header.php. I suggest this change be incorporated into the code repository, as it is always a good idea to specify the charset explicitly in the response headers.
If anything is unclear, let me know.
By the way, the patch file is a diff created with the command "diff -au".
Best regards,
Odd
----------------------------------------------------------------------
Comment By: GingerDog (gingerdog)
Date: 2008-05-07 05:25
Message:
Logged In: YES
user_id=1761957
Originator: NO
Thanks for the bug report; we believe this has been fixed in subversion.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=937964&aid=1959206&group_id=191583
|