summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--htdocs/dev/tests/charset_mismatch-http_meta.html.utf816
-rw-r--r--htdocs/dev/tests/charset_mismatch-http_xmldec.xhtml.utf818
-rwxr-xr-xhtdocs/dev/tests/index.html17
3 files changed, 49 insertions, 2 deletions
diff --git a/htdocs/dev/tests/charset_mismatch-http_meta.html.utf8 b/htdocs/dev/tests/charset_mismatch-http_meta.html.utf8
new file mode 100644
index 0000000..e04ad54
--- /dev/null
+++ b/htdocs/dev/tests/charset_mismatch-http_meta.html.utf8
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+
+<html lang="en">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>ünti†lø∂</title>
+</head>
+<body>
+ <p>This UTF-8 encoded document (served via HTTP as UTF-8) declares
+ its charset as being iso-8859-1 (in the head meta elements). HTTP has precedence
+ and the parsing should proceed properly as utf-8, with a warning about
+ the HTTP/meta charset mismatch.</p>
+
+</body>
+</html>
diff --git a/htdocs/dev/tests/charset_mismatch-http_xmldec.xhtml.utf8 b/htdocs/dev/tests/charset_mismatch-http_xmldec.xhtml.utf8
new file mode 100644
index 0000000..5a9873e
--- /dev/null
+++ b/htdocs/dev/tests/charset_mismatch-http_xmldec.xhtml.utf8
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+ <title>ünti†lø∂</title>
+
+</head>
+
+<body>
+<p>This UTF-8 encoded document (served via HTTP as UTF-8) declares
+ its charset as being iso-8859-1 (in the XML decl). HTTP has precedence
+ and the parsing should proceed properly as utf-8, with a warning about
+ the HTTP/XMLdecl charset mismatch.</p>
+
+</body>
+</html>
diff --git a/htdocs/dev/tests/index.html b/htdocs/dev/tests/index.html
index ddaa256..2308cef 100755
--- a/htdocs/dev/tests/index.html
+++ b/htdocs/dev/tests/index.html
@@ -1,5 +1,5 @@
-<!--#set var="revision" value="\$Id: index.html,v 1.82 2007-08-06 05:40:34 ot Exp $"
---><!--#set var="date" value="\$Date: 2007-08-06 05:40:34 $"
+<!--#set var="revision" value="\$Id: index.html,v 1.83 2007-08-15 01:31:55 ot Exp $"
+--><!--#set var="date" value="\$Date: 2007-08-15 01:31:55 $"
--><!--#set var="title" value="The W3C Markup Validation Service: Tests"
--><!--#set var="relroot" value="../../"
--><!--#include virtual="../../header.html" -->
@@ -484,6 +484,19 @@ All these documents should validate, without "pretty print" for the document typ
<li><a href="../../check?uri=http://www.vir.si/">windows-1250 encoded document (Slovenian)</a></li>
<li><a href="../../check?uri=http://www.w3.org/TR/ruby/">utf-8 encoded document</a></li>
<li><a href="../../check?uri=http://qa-dev.w3.org/wmvs/HEAD/dev/tests/plane20-char.xml">XML file with a "Plane 20" character (bogus).</a></li>
+
+ <li>
+ <a href="../../check?uri=http://qa-dev.w3.org/wmvs/HEAD/dev/tests/charset_mismatch-http_xmldec.xhtml.utf8;ss">validate</a> -
+ <a href="http://validator.w3.org/check?uri=http://qa-dev.w3.org/wmvs/HEAD/dev/tests/charset_mismatch-http_xmldec.xhtml.utf8;ss">with v.w.o</a> -
+ <a href="http://qa-dev.w3.org/wmvs/HEAD/dev/tests/charset_mismatch-http_xmldec.xhtml.utf8">view</a>:
+ Charset mismatch: HTTP Content-Type and XML Declaration (sends warning, proceed with HTTP and pass)
+ </li>
+ <li>
+ <a href="../../check?uri=http://qa-dev.w3.org/wmvs/HEAD/dev/tests/charset_mismatch-http_meta.html.utf8;ss">validate</a> -
+ <a href="http://validator.w3.org/check?uri=http://qa-dev.w3.org/wmvs/HEAD/dev/tests/charset_mismatch-http_meta.html.utf8;ss">with v.w.o</a> -
+ <a href="http://qa-dev.w3.org/wmvs/HEAD/dev/tests/charset_mismatch-http_meta.html.utf8">view</a>:
+ Charset mismatch: HTTP Content-Type and meta http-equiv (sends warning, proceed with HTTP and pass)
+ </li>
</ul>
<h3 id="errors">Error conditions &amp; strange cases</h3>