Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
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.