W3C home > Mailing lists > Public > www-validator-cvs@w3.org > September 2007

validator/httpd/cgi-bin check,1.570,1.571

From: Olivier Thereaux via cvs-syncmail <cvsmail@w3.org>
Date: Tue, 25 Sep 2007 07:22:06 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1Ia4kA-0008HG-Iu@lionel-hutz.w3.org>

Update of /sources/public/validator/httpd/cgi-bin
In directory hutz:/tmp/cvs-serv31785

Modified Files:
	check 
Log Message:
all our templates are utf-8

Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.570
retrieving revision 1.571
diff -u -d -r1.570 -r1.571
--- check	25 Sep 2007 07:05:28 -0000	1.570
+++ check	25 Sep 2007 07:22:03 -0000	1.571
@@ -326,11 +326,13 @@
   %template_defaults,
   filename          => File::Spec->catfile($CFG->{Paths}->{Templates},
                                            $lang, 'fatal-error.tmpl'),
+  filter => sub { my $ref = shift;${$ref} = Encode::decode_utf8(${$ref});}
 );
 $File->{Templates}->{AuthzReq} = HTML::Template->new(
   %template_defaults,
   filename          => File::Spec->catfile($CFG->{Paths}->{Templates},
                                            $lang, 'http_401_authrequired.tmpl'),
+ filter => sub { my $ref = shift;${$ref} = Encode::decode_utf8(${$ref});}
 );
 
 # templates for alternate output formats
@@ -339,30 +341,35 @@
   filename          => File::Spec->catfile($CFG->{Paths}->{Templates},
                                           $lang, 'xml_output.tmpl'),
   loop_context_vars => TRUE,
+  filter => sub { my $ref = shift;${$ref} = Encode::decode_utf8(${$ref});}
 );
 $File->{Templates}->{SOAP} = HTML::Template->new(
   %template_defaults,
   filename          => File::Spec->catfile($CFG->{Paths}->{Templates},
                                           $lang, 'soap_output.tmpl'),
   loop_context_vars => TRUE,
+  filter => sub { my $ref = shift;${$ref} = Encode::decode_utf8(${$ref});}
 );
 $File->{Templates}->{UCN} = HTML::Template->new(
   %template_defaults,
   filename          => File::Spec->catfile($CFG->{Paths}->{Templates},
                                           $lang, 'ucn_output.tmpl'),
   loop_context_vars => TRUE,
+  filter => sub { my $ref = shift;${$ref} = Encode::decode_utf8(${$ref});}
 );
 $File->{Templates}->{SOAPFault} = HTML::Template->new(
   %template_defaults,
   filename          => File::Spec->catfile($CFG->{Paths}->{Templates},
                                           $lang, 'soap_fault.tmpl'),
   loop_context_vars => TRUE,
+  filter => sub { my $ref = shift;${$ref} = Encode::decode_utf8(${$ref});}
 );
 $File->{Templates}->{SOAPDisabled} = HTML::Template->new(
   %template_defaults,
   filename          => File::Spec->catfile($CFG->{Paths}->{Templates},
                                           $lang, 'soap_disabled.tmpl'),
   loop_context_vars => TRUE,
+  filter => sub { my $ref = shift;${$ref} = Encode::decode_utf8(${$ref});}
 );
 $File->{Templates}->{EARLXML} = HTML::Template->new(
   %template_defaults,
@@ -370,6 +377,7 @@
                                           $lang, 'earl_xml.tmpl'),
   loop_context_vars => TRUE,
   global_vars       => TRUE,
+  filter => sub { my $ref = shift;${$ref} = Encode::decode_utf8(${$ref});}
 );
 $File->{Templates}->{EARLN3} = HTML::Template->new(
   %template_defaults,
@@ -377,6 +385,7 @@
                                           $lang, 'earl_n3.tmpl'),
   loop_context_vars => TRUE,
   global_vars       => TRUE,
+  filter => sub { my $ref = shift;${$ref} = Encode::decode_utf8(${$ref});}
 );
 
 $File->{Templates}->{PrefillHTML} = HTML::Template->new(
@@ -385,6 +394,7 @@
                                           $lang, 'prefill_html401.tmpl'),
   loop_context_vars => TRUE,
   global_vars       => TRUE,
+  filter => sub { my $ref = shift;${$ref} = Encode::decode_utf8(${$ref});}
 );
 $File->{Templates}->{PrefillXHTML} = HTML::Template->new(
   %template_defaults,
@@ -392,6 +402,7 @@
                                           $lang, 'prefill_xhtml10.tmpl'),
   loop_context_vars => TRUE,
   global_vars       => TRUE,
+  filter => sub { my $ref = shift;${$ref} = Encode::decode_utf8(${$ref});}
 );
 
 $File->{Templates}->{Result}->param(cfg_home_page => $CFG->{'Home Page'});
@@ -1670,7 +1681,7 @@
 #          }
 #        } else {
 #          $Msgs{$num} = 1;
-          $explanation .= "\n    $RSRC->{msg}->{$num}->{verbose}\n"
+          $explanation .= Encode::decode_utf8("\n    $RSRC->{msg}->{$num}->{verbose}\n")
             if exists $RSRC->{msg}->{$num}
             && exists $RSRC->{msg}->{$num}->{verbose};
 #        }
Received on Tuesday, 25 September 2007 07:22:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:54:59 GMT