You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs@httpd.apache.org by bu...@apache.org on 2013/11/04 16:52:35 UTC

[Bug 55741] New: Documentation is served with incorrect character encoding

https://issues.apache.org/bugzilla/show_bug.cgi?id=55741

            Bug ID: 55741
           Summary: Documentation is served with incorrect character
                    encoding
           Product: Apache httpd-2
           Version: 2.5-HEAD
          Hardware: PC
                OS: All
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Documentation
          Assignee: docs@httpd.apache.org
          Reporter: djc@apache.org

In Firefox 27.0a2, this page is interpreted incorrectly:

http://httpd.apache.org/docs/current/mod/mod_authz_user.html

I.e., despite the XML prolog, Firefox seems to assume the page is encoded in
UTF-8, while it's actually in ISO-8859-1. I looked up what seems to be relevant
documentation from the W3C:

http://www.w3.org/International/questions/qa-html-encoding-declarations#quicklookup

Given that table, it seems like the XML prolog declaration is only effective
when the document is served as text/xml. Since this one is served as text/html,
the XHTML form of inline character encoding should be used:

<meta http-equiv="Content-type" content="text/html;charset=ISO-8859-1" />

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 55741] Documentation is served with incorrect character encoding

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55741

--- Comment #3 from Leif Halvard Silli <xn...@xn--mlform-iua.no> ---
I specifically installed Firefox nightly (for Mac OS X, version 28.0a1
(2013-11-04)) to check this, and I can *NOT* confirm this. I also tested
Firefox 24 and 25.

The encoding is actually windows-1252, says my copies of Firefox. 

It is true, however, that Firefox does not use the 

  <?xml version="1.0" encoding="ISO-8859-1"?>

So, what happens is that Firefox falls back to the browser’s default encoding.

What the default encoding is, depends (on an unmodified version of Firefox) of
the locale. So, if I was browsing that page from a Russian locale, Firefox
would probably fall back to Windows-1251 - the legacy encoding for Russian.

My conclusion is that Dirkjan is right with regard to how the encoding has to
be declared. 

But I agree with Nick that generating all pages as UTF-8 would be the best.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


[Bug 55741] Documentation is served with incorrect character encoding

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55741

--- Comment #9 from Dirkjan Ochtman <dj...@apache.org> ---
BTW, even without forcing the UTF-8 default, I still see the unknown-character
glyph for the space character in "Module Identifier and "Source File".

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 55741] Documentation is served with incorrect character encoding

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55741

--- Comment #5 from Nick Kew <ni...@webthing.com> ---
(In reply to Nick Kew from comment #4)

> In that case, can you explain wtf you're talking about?  I can't see
> anything non-ASCII in that page!

Sorry, scrap that.  It's those spaces, and the title Fran

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 55741] Documentation is served with incorrect character encoding

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55741

--- Comment #1 from Nick Kew <ni...@webthing.com> ---
I guess this must be the French language page you're seeing?

It looks to me as if the better fix would be to use the French language XSLT
stylesheet to generate all HTML pages in utf-8.  Unless our .fr folks have some
compelling reason to do otherwise?

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 55741] Documentation is served with incorrect character encoding

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55741

Dirkjan Ochtman <dj...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Hardware|PC                          |All
            Version|2.5-HEAD                    |2.4-HEAD

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 55741] Documentation is served with incorrect character encoding

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55741

--- Comment #8 from Dirkjan Ochtman <dj...@apache.org> ---
(In reply to Leif Halvard Silli from comment #7)
> “A bunch“ is very unspecific.

Yes, I'm not a HTML WG invited expert. ;)

> As a HTML WG invited expert, pointing to the latest draft, I can say that
> most Firefox locales default to WINDOWS-1252/ISO-8859-1:
> http://www.w3.org/html/wg/drafts/html/master/syntax.html#determining-the-
> character-encoding
> 
> So, if  your alpha version of Firefox 27 parses that page as UTF-8, then it
> must be because something causes your browser to default to UTF-8. 

Okay, I did find that I had forced the default to UTF-8, and I've now removed
that to prevent this kind of problems in the future.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


[Bug 55741] Documentation is served with incorrect character encoding

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55741

--- Comment #2 from Dirkjan Ochtman <dj...@apache.org> ---
Nope, I'm getting mod_authz_user.html.en.

Interestingly, I don't see any issues when requesting the page with Firefox for
Android (26.0).

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 55741] Documentation is served with incorrect character encoding

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55741

--- Comment #10 from Leif Halvard Silli <xn...@xn--mlform-iua.no> ---
(In reply to Dirkjan Ochtman from comment #9)
> BTW, even without forcing the UTF-8 default, I still see the
> unknown-character glyph for the space character in "Module Identifier and
> "Source File".

May be it remembers the encoding.  You need to clear all history and cache etc
from your copy of Firefox, then you Firefox will not remember the encoding.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 55741] Documentation is served with incorrect character encoding

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55741

--- Comment #6 from Dirkjan Ochtman <dj...@apache.org> ---
(In reply to Nick Kew from comment #4)
> In any case, it looks like a firefox issue (or a local issue).  I haven't
> checked it in the latest update, but when I first worked on charset issues,
> the HTTP spec *explicitly* made iso-9958-1 a default if no explicit
> content-type was indicated.  Hence a browser needs, at a minimum, to accept
> it.

That may be so, but I think a bunch of this changed with HTML5 and new-found
enthusiasm for standardizing actual browser behavior. Please check the W3C
table I linked to in the description.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 55741] Documentation is served with incorrect character encoding

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55741

--- Comment #7 from Leif Halvard Silli <xn...@xn--mlform-iua.no> ---
(In reply to Dirkjan Ochtman from comment #6)
> (In reply to Nick Kew from comment #4)
> > In any case, it looks like a firefox issue (or a local issue).  I haven't
> > checked it in the latest update, but when I first worked on charset issues,
> > the HTTP spec *explicitly* made iso-9958-1 a default if no explicit
> > content-type was indicated.  Hence a browser needs, at a minimum, to accept
> > it.
> 
> That may be so, but I think a bunch of this changed with HTML5 and new-found
> enthusiasm for standardizing actual browser behavior. Please check the W3C
> table I linked to in the description.


“A bunch“ is very unspecific. And HTTP is almost irrelevant to the issue.

As a HTML WG invited expert, pointing to the latest draft, I can say that most
Firefox locales default to WINDOWS-1252/ISO-8859-1:
http://www.w3.org/html/wg/drafts/html/master/syntax.html#determining-the-character-encoding

So, if  your alpha version of Firefox 27 parses that page as UTF-8, then it
must be because something causes your browser to default to UTF-8. 

All this being said: If the page *had* declared the encoding properly, we would
not have been having this discussion. Because, as is, the page does *not*
declare any encoding in a HTML conforming way - HTML5 conformance, these days,
is regulated by HTML5.

When the browsers fails to find a encoding definition, HTML5.x instructs the
parser to default to some encoding - usually a locale default, but it could
also be a another default.

So, to Nick Kew: It is wrong to say that this is local issue. More correct is
that HTML5.x *requires* the browser to fallback to a local encoding when the
page - as is the the case here - fails to declare the encoding.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


[Bug 55741] Documentation is served with incorrect character encoding

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55741

--- Comment #4 from Nick Kew <ni...@webthing.com> ---
(In reply to Dirkjan Ochtman from comment #2)
> Nope, I'm getting mod_authz_user.html.en.

In that case, can you explain wtf you're talking about?  I can't see anything
non-ASCII in that page!

In any case, it looks like a firefox issue (or a local issue).  I haven't
checked it in the latest update, but when I first worked on charset issues, the
HTTP spec *explicitly* made iso-9958-1 a default if no explicit content-type
was indicated.  Hence a browser needs, at a minimum, to accept it.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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