Uploaded image for project: 'Xerces2-J'
  1. Xerces2-J
  2. XERCESJ-1041

Xerces C++ defines an encoding-string that Xerces/Java refuses to parse

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • 2.4.0
    • None
    • None
    • None
    • XercesC-2.3, XalanJ 2.4, Solaris 6

    Description

      We are using Xerces C++ to create XML-Messages that are later parsed by Xerces/Java.

      XercesC provides a define XMLUni::fgISO88591EncodingString for setting the encoding, the XML-Message contains the string "ISO8859-1" as encoding.

      When we later use Xerces/Java to parse this file, we get the following error:

      [Fatal Error] :1:43: Invalid encoding name "ISO8859-1".

      It seems that Xerces/Java only knows the encoding "ISO-8859-1" (with a dash), but not "ISO8859-1" (without dash).

      The XML-Specification states that "ISO-8859-1" (with a dash) SHOULD be used, look at http://www.w3.org/TR/2004/REC-xml-20040204/#charencoding

      So in my opinion either Xerces C++ should not provide that define any more, or Xerces/Java should be enhanced to accept that encoding-string. Otherwise XercesC and XercesJ differ in this part, where we until now thought they would be equal in their parsing-behavior.

      I already report a Bug at http://issues.apache.org/jira/browse/XERCESC-1336 that reports this for XercesC.

      Attachments

        Activity

          People

            Unassigned Unassigned
            centic Dominik Stadler
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: