RFR: 8317246: Cleanup java.net.URLEncoder and URLDecoder use of file.encoding property

Alan Bateman alanb at openjdk.org
Thu Sep 28 18:13:15 UTC 2023


On Thu, 21 Sep 2023 09:29:37 GMT, Claes Redestad <redestad at openjdk.org> wrote:

> There are mysterious interactions with `-Dfile.encoding=COMPAT` and `native.encoding` that I don't fully understand, but it does seem odd that `URLDecoder/-Encoder` rely directly on the `StaticProperty.fileEncoding()` string. I'll have to defer to @RogerRiggs and @AlanBateman if changing to `Charset.defaultCharset()` is appropriate or not.

The deprecated encode/decode methods are specified to use the default charset.  The motivation for the change in the PR is vague.

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

PR Comment: https://git.openjdk.org/jdk/pull/15353#issuecomment-1729211676


More information about the net-dev mailing list