You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2006/09/07 13:43:19 UTC

DO NOT REPLY [Bug 40432] New: - Charset of date on error pages

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40432>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40432

           Summary: Charset of date on error pages
           Product: Apache httpd-2
           Version: 2.2.2
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: egmont@uhulinux.hu


The error text (e.g. "Objekt nicht gefunden" and its longer explanation) is 
presented in the language the client requests. Its character set is defined for 
every language by the error templates Apache provides.

However, in the footer, the date is shown in the language and charset 
corresponding to the locale on the server side, with no character set 
conversion.

As a result, if these two character sets do not match, the date will be shown 
with wrong accented characters.

For example, suppose Apache runs with LC_ALL=fr_FR.UTF-8 and the client 
requests French language. The header of the returned page will define the ISO-
8859-1 charset (taken from the error templates), but the date will be put there 
with UTF-8, hence it appears as "double UTF-8". Stranger results (even invalid 
byte sequences) can occur with other combination of the two languages (e.g. the 
server may run with hu_HU while the client requests Japanese...)

Suggested solutions:

- [I'd prefer this one] Convert all error templates to UTF-8, and modify Apache 
to convert the date string received from libc (strftime() I guess) from the 
current locale to UTF-8.

or

- Modify Apache to convert the date string received from libc from the current 
locale to &#num; html entities so that they work with any character set. [I 
hate html entities anyway and I see no reason not to use bare UTF-8.]

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 40432] - Charset of date on error pages

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40432>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40432


jorton@redhat.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|Core                        |Documentation




------- Additional Comments From jorton@redhat.com  2006-09-07 12:00 -------
For both this and bug 40431 the problem is basically the same: the locale is a
process-global setting which cannot be changed per-request, and changing it to
match an Accept-Language/Charset-supplied values would probably be a nightmare
anyway.

I think the right fix for this is to simply remove the date from the error
pages.  It's not particularly useful and this complaint is not unreasonable.

[in glibc there are locale-specific interfaces which can use non-global locale
context but being able to use these in httpd would be nearly impossible without
designing a set of essentially glibc-specific interfaces]

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 40432] - Charset of date on error pages

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40432>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40432





------- Additional Comments From egmont@uhulinux.hu  2006-09-07 12:18 -------
Well, instead of removing the date, you could perhaps format it using numbers 
only (e.g. 2006/09/07 14:15 +0200) or format in English using a built-in table 
of English month and weekday names (hence not using libc's localized names).

I know about this newlocale()/uselocale()/*_l() stuff, but that's really glibc-
specific and requires a quite recent glibc, too. So it'd really be a bad 
approach for apache. I didn't realize when submitting the bug that apache is a 
multi-thread app so using setlocale() around strftime() isn't safe.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 40432] - Charset of date on error pages

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40432>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40432


slive@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From slive@apache.org  2007-07-31 12:49 -------
The date has been removed from the error pages.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 40432] - Charset of date on error pages

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40432>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40432





------- Additional Comments From jorton@redhat.com  2006-09-07 12:00 -------
*** Bug 40431 has been marked as a duplicate of this bug. ***

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org