- From: Martin Duerst <duerst@dev.w3.org>
- Date: Wed, 15 Dec 2004 08:09:00 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/validator/httpd/cgi-bin In directory hutz:/tmp/cvs-serv6310 Modified Files: check Log Message: made sure UTF-8 BOM warning was only produced for actual UTF-8 files Index: check =================================================================== RCS file: /sources/public/validator/httpd/cgi-bin/check,v retrieving revision 1.363 retrieving revision 1.364 diff -u -d -r1.363 -r1.364 --- check 20 Nov 2004 09:09:38 -0000 1.363 +++ check 15 Dec 2004 08:08:57 -0000 1.364 @@ -2409,7 +2409,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 Wednesday, 15 December 2004 08:09:00 UTC