On Thu, 20 Nov 2025 11:05:59 GMT, Severin Gehwolf <[email protected]> wrote:
>> Please review this simple fix to `jlink`'s `--release-info` plugin to handle >> non-ASCII in vendor strings. The JDK build uses UTF-8 encoding for the >> produced `release` file that is being passed to `jlink` at build-time via >> the `--release-info` plugin. However, the plugin internally uses >> `java.util.Properties.load(InputStream)` API which assumes `ISO-8859-1` >> encoding of the input stream. The proposed fix is to use the >> `java.util.Prorperties.load(Reader)` API instead and pass it an >> `InputStreamReader` with `UTF-8` encoding. >> >> Testing: >> - [x] GHA >> - [x] `test/jdk/tools/jlink` tests including the new reg-test which fails >> prior and passes after the fix. >> >> Thoughts? > > Severin Gehwolf has updated the pull request incrementally with one > additional commit since the last revision: > > Specify that the input file shall be UTF-8 > Question is if it's worth supporting arbitrary _input_ encondings for > `--release-info <file>` usages. `<file>` is currently in UTF-8 in the JDK > build, so went with that expectation. But arguably it could be any other > encoding a user chooses. So to make it generic, it's conceivable to allow > `--release-info=<file>,<encoding>` or some such to allow non-UTF-8 as input > and still do the right thing (Note: output would still be UTF-8). Perhaps > it's not worth the trouble? That seems unnecessary complexity, I think we should just keep it as UTF-8. ------------- PR Comment: https://git.openjdk.org/jdk/pull/28399#issuecomment-3557683372
