This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 162 - Localized reports have no charset parameter
Summary: Localized reports have no charset parameter
Status: RESOLVED FIXED
Alias: None
Product: CSSValidator
Classification: Unclassified
Component: main pages/translations (show other bugs)
Version: CSS Validator
Hardware: Other other
: P1 normal
Target Milestone: ---
Assignee: Philippe Le Hegaret
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-27 22:21 UTC by Bj
Modified: 2005-07-20 09:08 UTC (History)
1 user (show)

See Also:


Attachments

Description Bj 2003-02-27 22:21:07 UTC
E.g.

HEAD /css-validator/validator?uri=http://www.w3.org HTTP/1.1
Host: jigsaw.w3.org
Accept-Language: de

returns

HTTP/1.1 200 OK
Cache-Control: no-cache
Date: Fri, 28 Feb 2003 03:20:28 GMT
Pragma: no-cache
Content-Length: 23776
Content-Language: de
Content-Type: text/html
Server: Jigsaw/2.2.0 W3C_CSS_Validator_JFouffa/2.0

The Content-Type header should specify a charset parameter.
Comment 1 Olivier Thereaux 2004-10-06 01:32:36 UTC
The encoding decl seems to be properly set in the markup
[[
<?xml version='1.0' encoding='iso-8859-1'?>
]]
Comment 2 Bj 2004-10-06 02:29:13 UTC
The HTML Working Group resolved that user agents should not attempt to sniff 
for XHTML in text/html resources, the XML declaration is thus treated according 
to the rules in HTML 4.01 which is to consider it a processing instruction and 
thus ignore it. An encoding declaration in the "XML declaration" is not 
sufficient for text/html resources.
Comment 3 Etan Wexler 2004-10-27 11:16:55 UTC
An encoding declaration in the XML declaration is sub-optimal even for XHTML. 

The utility of a proper HTTP parameter is not something to toss away so lightly.
Comment 4 Bj 2005-06-19 19:59:44 UTC
(In reply to comment #0)
> HEAD /css-validator/validator?uri=http://www.w3.org HTTP/1.1
> Host: jigsaw.w3.org
> Accept-Language: de

This with GET now returns

HTTP/1.1 200 OK
Cache-Control: no-cache
Date: Sun, 19 Jun 2005 19:47:33 GMT
Pragma: no-cache
Transfer-Encoding: chunked
Content-Language: de
Content-Type: text/html
Server: Jigsaw/2.2.5

400
<?xml version='1.0' encoding='iso-8859-1'?>
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
...
Sie k?nnen ...
...

I.e., it seems the StyleSheetGeneratorHTML2 assumes an inccorect input encoding 
for the resource files and generates replaces the non-ascii characters 
with "?". I think the validator previously messed them up in a different way, 
or that my browser assumed an incorrect encoding due to the lack of the charset 
parameter.
Comment 5 Yves Lafon 2005-07-20 09:08:17 UTC
Fixed now and moved to utf-8, see

HEAD /css-validator/validator?uri=http://www.w3.org HTTP/1.1
Host: jigsaw.w3.org
Accept-Language: de

HTTP/1.1 200 OK
Cache-Control: no-cache
Date: Wed, 20 Jul 2005 09:06:49 GMT
Pragma: no-cache
Content-Length: 27773
Content-Language: de
Content-Type: text/html;charset=utf-8
Server: Jigsaw/2.2.5