On a related note to gh-27646, our EncodedResource
should consistently be used with StandardCharsets
arguments instead of String encoding names. Also, there are URLEncoder
/URLDecoder
variants with a Charset
argument in JDK 10+ now.
Comment From: dreis2211
Please check https://github.com/spring-projects/spring-framework/pull/27554
Comment From: jhoeller
Oops, sorry for not noticing your PR before, @dreis2211 ... This consistency commit of mine only really covered a single URLEncoder case but the PR #27646 included some URLDecoder changes as well, next to the toString stuff.
If you could rebase #27554 against current main, we'll see how much we're still missing. From a quick glance, there are quite a few hard-coded "UTF-8"
constants in use against URLDecoder
still. It'd be great to apply your PR for that purpose!
Comment From: dreis2211
@jhoeller Done
Comment From: jhoeller
@dreis2211 Wow that was quick, thanks for the immediate turnaround!