W3C home > Mailing lists > Public > public-css-testsuite@w3.org > October 2012

Re: HTML5 template: required <meta charset="UTF-8">

From: Øyvind Stenhaug <oyvinds@opera.com>
Date: Tue, 16 Oct 2012 10:33:47 +0200
To: public-css-testsuite@w3.org
Message-ID: <op.wl9jelp2bunlto@oyvinds-desktop>
On Mon, 15 Oct 2012 20:11:27 +0200, Gérard Talbot  
<css21testsuite@gtalbot.org> wrote:

> Le Lun 15 octobre 2012 13:30, Ian Hickson a écrit :
>> On Mon, 15 Oct 2012, "Gérard Talbot" wrote:
>>> I believe <meta charset="UTF-8"> is required in HTML5 documents.
>> It's also possible (and IMHO preferred) to just put the character
>> encoding
>> declaration in the MIME type.
> Yes, it is.
> But several HTML editors will use appropriate encoding when reading
> <meta charset="UTF-8">: eg BlueFish 2.2.3. Otherwise, by default, the
> charset of operating system may be used. Or the predefined charset
> setting of the HTML editor may be used. Since creation, submission of
> tests is definitely an international effort, we should try to reduce,
> minimize sources of errors and sources of incompatiblity at design time,
> at source-coding time.

I think it should be up to the submitter to deal with this correctly, any  
potential issues should hopefully be caught in review. The test format  
page currently says

"The preferred submission format for CSSWG tests is either XHTML or HTML5,  
in UTF-8."


"When using any characters beyond the ASCII set, in any encoding, the  
character encoding must be specified properly per the specification of the  
source format."

This seems sufficient (there is also a mention further down about  
.htaccess being the way to set HTTP headers).

> Also, if/when documents are being checked by conformance checkers or
> validators (add-on validator), they will report missing charset.
> Eg. Firefox 16.0.1 Error console reports it. It says incorrect
> characters will be displayed if document contains characters outside
> us-ascii.

I think tests (and test resources) should be validated from the server  
anyway, not locally or by file upload. There could be HTTP headers that  
matter, e.g. Content-Type overrides <meta charset>.

Finally, consider tests for things like  
http://www.w3.org/TR/CSS21/syndata.html#charset - some of these would even  
*require* the absence of <meta charset> and/or @charset.

Øyvind Stenhaug
Core Norway, Opera Software ASA
Received on Tuesday, 16 October 2012 08:34:17 UTC

This archive was generated by hypermail 2.4.0 : Friday, 20 January 2023 19:58:18 UTC