RFR: 8279328: CssParser uses default charset instead of UTF-8

Ajit Ghaisas aghaisas at openjdk.java.net
Thu Jan 6 12:39:19 UTC 2022


On Wed, 29 Dec 2021 15:39:39 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:

> `CssParser.parse(URL)` is specified to assume UTF-8 file encoding, but (implicitly) uses the default charset to read the file, potentially resulting in incorrect interpretation of the file content.
> 
> This can be fixed by explicitly specifying the UTF-8 charset for `InputStreamReader`.

The added test passes on my Mac without changing CssParser.java. It may be due to the default charset being UTF-8. Which platform did you test on?

-------------

PR: https://git.openjdk.java.net/jfx/pull/705


More information about the openjfx-dev mailing list