SSAX, utf8 and the byte order mark

Charles Breathe <ctbreathe-/[email protected]> Fri, 5 Jan 2007 13:16:07 -0800 (PST)
Newsgroups gmane.lisp.scheme.ssax-sxml
Message-ID <[email protected]>
Is there a workaround for the problem described below &/or is a it a bug?

----- Forwarded Message ----
From: John Cowan <[email protected]>
To: Charles Breathe <ctbreathe-/[email protected]>
Cc: [email protected]
Sent: Friday, January 5, 2007 12:54:03 PM
Subject: Re: [Chicken-users] SSAX, utf8 and the byte order mark

Charles Breathe scripsit:

> In the process of trying to write a script in Chicken I attempted
> to use the SSAX XML->SXML function with a stream that begins with a
> UTF-8 byte order mark. Unfortunately the function dies when it reads
> the BOM. Currently I'm converting it to a stream and then filtering
> out the offending characters, but that seems terribly ugly. Is there a
> better approach? Is this something that the XML->SXML function should
> be handling itself?

[putting on XML Core Working Group hat]

This is an XML->SXML issue.  For a long time it wasn't too clear whether
UTF-8-encoded XML documents were allowed to contain a BOM or not.
(UTF-16-encoded documents are required to do so.)  As a result of an
erratum, the XML Recommendation now requires that UTF-8 BOMs be accepted
and ignored.

-- 
Even the best of friends cannot                 John Cowan
attend each others' funeral.                    [email protected]
        --Kehlog Albran, The Profit             http://www.ccil.org/~cowan




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV