Closed as not planned
Closed as not planned
Description
I believe i found an issue with UriUtils.decode(String source, Charset charset)
.
When the source
string contains the character ’
(Right Single Quotation Mark - unicode 2019), and other URI characters (to trigger the rewrite of the string), the character is changed to �
(End of Medium - unicode 0019).
Here is a sample test in Kotlin that highlights the behaviour:
@Test
fun test(){
val c = '\u2019'
val s = "%20$c"
val expected = " $c"
val d = UriUtils.decode(s, Charsets.UTF_8)
assertThat(d).isEqualTo(expected)
}
Here is the difference shown from the failing test:
" ’"
" �"
I am using Spring 6.2.0.