[ 
https://issues.apache.org/jira/browse/MSHARED-980?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sylwester Lachiewicz updated MSHARED-980:
-----------------------------------------
    Component/s: maven-shared-utils

> Xpp3DomBuilder does not handle XML encoding per spec
> ----------------------------------------------------
>
>                 Key: MSHARED-980
>                 URL: https://issues.apache.org/jira/browse/MSHARED-980
>             Project: Maven Shared Components
>          Issue Type: Bug
>          Components: maven-shared-utils
>            Reporter: Elliotte Rusty Harold
>            Priority: Major
>
> 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.
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to