Uploaded image for project: 'Xerces-C++'
  1. Xerces-C++
  2. XERCESC-1653

XML Document with UTF-8 BOM but without declaration fails to parse

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 2.6.0, 2.7.0
    • None
    • Non-Validating Parser
    • None
    • Windows, AIX

    Description

      En XML document starting with an UTF-8 BOM, but without a xml declaration gives a parse error:

      Fatal Error at file E:\bomtest/xmlUTF8nodec.xml, line 1, char 1
      Message: Invalid document structure
      scanFirst() failed

      The same document with BOM and a xml declaration parses OK.

      As far as i can tell from the XML spec, a XML document containing a UTF-8 BOM do not require a XML declaration to be present.

      Attachments

        1. xmlUTF8.xml
          1 kB
          Maarten Koskamp
        2. xmlUTF8nodec.xml
          1.0 kB
          Maarten Koskamp

        Activity

          People

            Unassigned Unassigned
            koskm00 Maarten Koskamp
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: