css4j / echosvg

SVG implementation in the Java™ Language, fork of Apache Batik, supporting level 4 selectors and colors.
Apache License 2.0
39 stars 2 forks source link

`DocumentFactory` interface has no way to specify `InputStream`'s encoding #72

Closed carlosame closed 1 year ago

carlosame commented 1 year ago

The DocumentFactory interface has the following factory method that creates a Document from an InputStream:

https://github.com/css4j/echosvg/blob/62bcdac4f5ece6b10f75d9dcf1505de1c3782499/echosvg-dom/src/main/java/io/sf/carte/echosvg/dom/util/DocumentFactory.java#L69

But there is no variant of that method that allows an encoding to be specified. Although the equivalent method with a Reader could be used, the method above is almost encouraging usages that aren't i18n-safe.