- From: Martin Duerst <duerst@dev.w3.org>
- Date: Tue, 14 Dec 2004 13:01:26 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/validator/httpd/cgi-bin In directory hutz:/tmp/cvs-serv21970 Modified Files: Tag: iconv-halfline check Log Message: made sure UTF-8 BOM warning was only produced for actual UTF-8 Index: check =================================================================== RCS file: /sources/public/validator/httpd/cgi-bin/check,v retrieving revision 1.324.2.2 retrieving revision 1.324.2.3 diff -u -d -r1.324.2.2 -r1.324.2.3 --- check 5 Jun 2003 15:22:33 -0000 1.324.2.2 +++ check 14 Dec 2004 13:01:24 -0000 1.324.2.3 @@ -2038,7 +2038,8 @@ } # Add a warning if doc is UTF-8 and contains a BOM. - if ($File->{Content}->[0] =~ m(^\xEF\xBB\xBF)) { + if ($File->{Charset}->{Use} eq 'utf-8' && + $File->{Content}->[0] =~ m(^\xEF\xBB\xBF)) { &add_warning($File, 'note', 'Note:', <<".EOF."); The Unicode Byte-Order Mark (BOM) in UTF-8 encoded files is known to cause problems for some text editors and older browsers. You may want to consider
Received on Tuesday, 14 December 2004 13:01:27 UTC