UTF-8 BOM w/ ISO-8859-1 encoding pseudo attribute

Discussion in 'XML' started by Erik Wahlstrom, Aug 18, 2004.

  1. I have an XML document that includeds a UTF-8 BOM (0xEF 0xBB 0xBF).
    The document is properly encoded as UTF-8. However the XMLDecl
    encoding pseudo attribute indicates 'ISO-8859-1'. So how SHOULD the
    XML processor handle this? Is it a fatal error? Clearly it cannot be
    processed as ISO-8859-1 because the content is scrambled. It appears
    the Xerces is parsing it according to ISo-8859-1 even though the BOM
    is there. Hmm. Any sugestions? How should one handle this case?


    Erik
    Erik Wahlstrom, Aug 18, 2004
    #1
    1. Advertising

  2. In article <>,
    Erik Wahlstrom <> wrote:
    >I have an XML document that includeds a UTF-8 BOM (0xEF 0xBB 0xBF).
    >The document is properly encoded as UTF-8. However the XMLDecl
    >encoding pseudo attribute indicates 'ISO-8859-1'. So how SHOULD the
    >XML processor handle this?


    XML (3rd edition) 4.3.3 says:

    In the absence of information provided by an external transport
    protocol (e.g. HTTP or MIME), it is a fatal error for an entity
    including an encoding declaration to be presented to the XML
    processor in an encoding other than that named in the declaration

    -- Richard
    Richard Tobin, Aug 18, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. gerlar2000
    Replies:
    0
    Views:
    618
    gerlar2000
    Feb 21, 2005
  2. Franck DARRAS
    Replies:
    12
    Views:
    634
    Jim Higson
    Aug 23, 2004
  3. MEARTURO
    Replies:
    3
    Views:
    1,071
    Oliver Wong
    Jul 6, 2006
  4. janib
    Replies:
    3
    Views:
    13,634
    Roland de Ruiter
    Aug 7, 2006
  5. JuanDG

    change encoding from UTF-8 to ISO-8859-1

    JuanDG, Feb 18, 2005, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    184
    JuanDG
    Feb 18, 2005
Loading...

Share This Page