[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: UTF-8 BOM

  • From: David Brownell <david-b@p...>
  • To: Richard Tobin <richard@c...>
  • Date: Sun, 24 Jun 2001 13:40:46 -0700

xml bom
I hooked it up to the XML conformance test DTD using
the attached "bomtests.xml" and ran it through its paces
that way.  (Easy way to handle any parser that can use
those 2000+ tests meaningfully ...)

Note that the enclosed file is written as if each of those test
cases is well-formed, though I don't think they are.  (While
UTF-16 specifies a BOM as part of the encoding, to be
removed, UTF-8 doesn't -- it's part of the encoded data.)

Results:

- Both AElfred2 (current) and Crimson 1.1 rejected "doc",
  "docx", "entx", "ent2x"; and accepted "ent", "ent2".

- Xerces 1.4 rejected only "ent2x", and accepted the
  others.

This issue should perhaps become part of "XML Blueberry"
if it leads to a spec revision, I'd suggest ... as with NEL on
mainframes, accepting it would suggest that the idea is that
the standards should dance to the tune of certain vendors,
rather than vendors dancing to the tune of standards!

- Dave


----- Original Message ----- 
From: "Richard Tobin" <richard@c...>
To: <xml-dev@l...>
Sent: Thursday, June 14, 2001 4:23 AM
Subject: UTF-8 BOM


> The W3C XML Core WG is considering the question of whether a UTF-8
> byte-order make (BOM) is allowed at the start of an XML entity.  This
> question was raised a few weeks ago in a thread on comp.text.xml
> starting at article
> 
>   <180520011620538217%andreas.prilop@a...>
> 
> We would like to determine how existing parsers handle the byte
> sequence #xEF #xBB #xBF when it appears at the start of an XML
> document or other entity.  Is it treated as a BOM (and not part
> of the text of the entity) or as a zero-width non-breaking space
> character?
> 
> We have placed a number of test cases at
> 
>   http://www.cogsci.ed.ac.uk/~richard/bomtest/
> 
> and would be grateful for feedback on how parsers handle them.  Please
> post results here in xml-dev to avoid unnecessary duplication.
> 
> We would also like to know of any editors (or similar tools) that
> generate XML documents starting with a UTF-8 BOM.
> 
> -- Richard (on behalf of the XML Core WG)
> 
> ------------------------------------------------------------------
> The xml-dev list is sponsored by XML.org, an initiative of OASIS
> <http://www.oasis-open.org>
> 
> The list archives are at http://lists.xml.org/archives/xml-dev/
> 
> To unsubscribe from this elist send a message with the single word
> "unsubscribe" in the body to: xml-dev-request@l...

<TESTCASES PROFILE="W3C BOM tests (via Richard Tobin)">

    <TEST ID="bom-doc" URI="doc.xml" TYPE="invalid"
    		SECTIONS="tbd">
	XML document with possible UTF-8 BOM, no XML declaration
	</TEST>

    <TEST ID="bom-docx" URI="docx.xml" TYPE="invalid"
    		SECTIONS="tbd">
	XML document with possible UTF-8 BOM, followed by XML declaration
	</TEST>

    <TEST ID="bom-ent" URI="ent.xml" TYPE="invalid" ENTITIES="general"
	    SECTIONS="tbd">
	XML document referring to external entity 
	with possible UTF-8 BOM, no XML declaration
	</TEST>

    <TEST ID="bom-entx" URI="entx.xml" TYPE="invalid" ENTITIES="general"
	    SECTIONS="tbd">
	XML document referring to external entity 
	with possible UTF-8 BOM, followed by XML declaration
	</TEST>

    <TEST ID="bom-ent2" URI="ent2.xml" TYPE="invalid" ENTITIES="general"
	    SECTIONS="tbd">
	XML document referring to external entity
	with possible UTF-8 BOM followed by ZWNBSP, 
	no XML declaration
	</TEST>

    <TEST ID="bom-ent2x" URI="ent2x.xml" TYPE="invalid" ENTITIES="general"
	    SECTIONS="tbd">
	XML document referring to external entity
	with possible UTF-8 BOM followed by ZWNBSP, 
	followed by misplaced XML declaration
	</TEST>

</TESTCASES>

  • References:
    • UTF-8 BOM
      • From: Richard Tobin <richard@c...>

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.