W3C home > Mailing lists > Public > www-validator@w3.org > December 2001

Wrong character encoding detect for XHTML

From: Karl Ove Hufthammer <huftis@bigfoot.com>
Date: Fri, 07 Dec 2001 12:13:45 +0100
Message-Id: <9uqbpn.3vundad.1@ID-99504.news.dfncis.de>
To: www-validator@w3.org
Bug report:

Testcase:
<URL: http://home.no.net/huftis/kritikk/false-encoding.html >

This document is an XHTML 1.1 document with no XML declaration.
No 'charset' parameter is sent by HTTP, therefore, the document
uses the character encoding 'UTF-8' (the default for all
X(HT)ML documents). But this document contains the following
line:

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

The W3C Validator says:
'Detected Character Encoding: iso-8859-1'

which is wrong. It should be 'UTF-8'. The validator also claims
the document is valid XHTML, which it isn't, since it contains
illegal UTF-8 byte sequences (if I change 'ISO-8859-1' to
'UTF-8', the validator (correctly) refuses to validate the
document because of this).

-- 
Karl Ove Hufthammer
Received on Friday, 7 December 2001 06:13:58 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:00 GMT