W3C home > Mailing lists > Public > public-css-testsuite@w3.org > November 2007

Re: Adding <meta> charset to HTML format tests

From: fantasai <fantasai.lists@inkedblade.net>
Date: Mon, 26 Nov 2007 21:16:58 -0500
Message-ID: <474B7E1A.4010700@inkedblade.net>
To: public-css-testsuite@w3.org, Ian Hickson <ian@hixie.ch>

L. David Baron wrote:
> On Wednesday 2007-10-31 18:35 +0700, Dan Kennedy wrote:
>> Checked out a fresh copy today. First question is about the test:
>>
>>   t040302-c61-ex-len-00-b-a.htm
>>
>> what encoding should the UA assume this test uses? 
> 
> Should we consider adding
>     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
> to the HTML version of the tests so that they work when downloaded?

This should do it, although I'm not sure if it's the right place to put
the change. Ian, does that look ok to you, or should this be in the
makefile instead?

~fantasai

Index: lib/format/html4.pm
===================================================================
RCS file: /sources/public/CSS/CSS2.1-test-suite/lib/format/html4.pm,v
retrieving revision 1.1
diff -u -r1.1 html4.pm
--- lib/format/html4.pm 2 Dec 2004 16:06:44 -0000       1.1
+++ lib/format/html4.pm 27 Nov 2007 02:12:44 -0000
@@ -13,5 +13,6 @@
      my $output = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">';
      $output .= "\n";
      $output .= html::treeAsHTML($tree);
+    $output =~ s#([ \t]+)<title>#<meta http-equiv="Content-Type" content="text/html; 
charset=UTF-8">\n$1<title>#m;
      return $output;
  }
Received on Tuesday, 27 November 2007 02:17:11 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 20 September 2010 17:51:55 GMT