Uploaded image for project: 'Maven Shared Components'
  1. Maven Shared Components
  2. MSHARED-980

Xpp3DomBuilder does not handle XML encoding per spec

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • maven-shared-utils
    • None

    Description

      Properly handled, there is never any need to specify the character encoding when reading an XML document. XML documents fully identify their character encoding. The developer at this level doesn't need to know and shouldn't think about the character encoding.

       

      That is, these methods are wrong:

       

      ```

      public static Xpp3Dom build( @WillClose InputStream is, @Nonnull String encoding )

      public static Xpp3Dom build( @WillClose InputStream is, @Nonnull String encoding, boolean trim )

      ```

       

      There should be no encoding argument. Instead the XML should be read from an InputStream without converting it to a reader first. Let the XML parser detect the encoding.

       

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            elharo Elliotte Rusty Harold
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: