Re: Validation of charset for HTML5

18.07.2011 21:49, Sylvia Götting wrote:

> I am using Firefox 4.0.1. and an addon called WebDeveloper.

Web Developer is an excellent tool for many purposes.

> On http://www.w3schools.com/html5/att_meta_charset.asp I read how to
> declare the charset, which in my case is
> <meta charset="ISO-8859-1" />.

W3schools is an unreliable and often confusing site, often mistakenly 
regarded as associated with the W3C (and many people suspect they want 
such confusion). The tag above is nto wrong as such, though.

> Warning /Line 11, Column 30/: Using windows-1252 instead of the declared
> encoding iso-8859-1.
>
> |	<meta charset="ISO-8859-1" /*>*|
>
>
> And yet, on the top of the validation page in the result list it says
> Encoding: iso-8859-1, and the combobox reads (detected auotomatically)

Yes, this is confusing. That part reflects how the checking was started. 
The HTML5 Conformance Checker may treat ISO-8859-1 as windows-1252, as 
the message says. You can avoid this by explicitly selecting "HTML5" in 
the "Doctype" dropdown menu. Strange.

If you do that and the document actually contains an octet that is 
defined in windows-1252 but undefined in ISO-8859-1, you get a message 
like "Forbidden code point U+0092." and checking is suppressed. Though 
theoretically odd, this can be useful in practice if you really want to 
use ISO-8895-1. But in practice, browsers mostly read ISO-8859-1 as 
windows-1252.

> There is, by the way, no difference whether I write iso in small or
> capital letters.

Neither shall there be any difference. Character encoding names are by 
definition case-insensitive.

> By the way: It says on top of the warning
>
>
>       Validation Output: 2 Warnings
>
> but there is only one.

I guess the statement "Using experimental feature: HTML5 Conformance 
Checker." counts as a warning. If there are no other complaints of any 
kind in the validator response, you get "1 warning(s)". This is probably 
intentional, trying to make people remember the checker is experimental 
(and HTML5 is mutable).

-- 
Yucca, http://www.cs.tut.fi/~jkorpela/

Received on Wednesday, 20 July 2011 07:53:12 UTC