BOM causing problems again?

Terje,

Once upon a time you graciously added code to handle the optional BOM on UTF-8 files, but I seem to have found a way to break that code. Could you take a look at this page and its resulting validation message, then tell me if I'm doing something wrong?

http://cadenceweb.com:8080/newsletter/sheerin/test/Prototype4.html

This seems to be specific to pages that have the XML prolog. I suppose there could be some other strange interloper character causing the problem, but it's probably the BOM.

:8001 validator report:
  a.. Note: UTF-8 'BOM' detected and removed. (This message is informational. See the explanation for details.) 
This Page Is NOT Valid XHTML 1.1!
Below are the results of attempting to parse this document with an SGML parser. 

  1.. Line 1, column 0: character "" not allowed in prolog 
  <?xml version="1.0" encoding="UTF-8"?>
  ^

Received on Tuesday, 9 July 2002 17:48:29 UTC