- From: Bjoern Hoehrmann via cvs-syncmail <cvsmail@w3.org>
- Date: Thu, 18 Aug 2005 18:20:54 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/validator/httpd/cgi-bin
In directory hutz:/tmp/cvs-serv26920
Modified Files:
check
Log Message:
Use Encode::Alias to restore support for some charset names
Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.443
retrieving revision 1.444
diff -u -d -r1.443 -r1.444
--- check 18 Aug 2005 03:45:08 -0000 1.443
+++ check 18 Aug 2005 18:20:52 -0000 1.444
@@ -48,6 +48,7 @@
use URI qw();
use URI::Escape qw(uri_escape);
use Encode qw();
+use Encode::Alias qw();
use HTML::Encoding 0.52 qw();
use SGML::Parser::OpenSP 0.99 qw();
@@ -450,6 +451,31 @@
&abort_if_error_flagged($File, O_CHARSET|O_DOCTYPE);
#
+# Encode alias definitions. This might not be the best
+# place for them, feel free to move them elsewhere.
+
+# implicit bidi, but character encoding is the same
+Encode::Alias::define_alias('iso-8859-6-i', 'iso-8859-6');
+
+# implicit bidi, but character encoding is the same
+Encode::Alias::define_alias('iso-8859-8-i', 'iso-8859-8');
+
+# 0xA0 is U+00A0 in ISO-8859-11 but undefined in tis-620
+# other than that the character encodings are equivalent
+Encode::Alias::define_alias('tis-620', 'iso-8859-11');
+
+# Encode::Byte does not know 'macintosh' but MacRoman
+Encode::Alias::define_alias('macintosh', 'MacRoman');
+
+# x-mac-roman is the non-standard version of 'macintosh'
+Encode::Alias::define_alias('x-mac-roman', 'MacRoman');
+
+# Encode only knows the long hand version of 'ksc_5601'
+Encode::Alias::define_alias('ksc_5601', 'KS_C_5601-1987');
+
+# gb18030 requires Encode::HanExtra but no additional alias
+
+#
# Always transcode, even if the content claims to be UTF-8
$File = transcode($File);
&abort_if_error_flagged($File, O_CHARSET);
Received on Thursday, 18 August 2005 18:21:01 UTC