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

Michael Strauß mstrauss at openjdk.java.net
Wed Dec 29 15:44:34 UTC 2021


`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`.

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

Commit messages:
 - Use UTF-8 charset to parse stylesheets
 - Failing test

Changes: https://git.openjdk.java.net/jfx/pull/705/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jfx&pr=705&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8279328
  Stats: 31 lines in 2 files changed: 30 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jfx/pull/705.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/705/head:pull/705

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


More information about the openjfx-dev mailing list