-
Notifications
You must be signed in to change notification settings - Fork 37.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I use getContentAsString()
and mockMvc seems to return my content as ISO 8859-1.
#23851
Comments
getContentAsString()
and mockMvc seems to return my Content as ISO 8859-1.getContentAsString()
and mockMvc seems to return my content as ISO 8859-1.
What happens if you do the following? assertEquals(List.of("AEß"),
objectMapper.readValue(mvcResult.getResponse().getContentAsString(StandardCharsets.UTF_8),
new TypeReference<List<String>>() {})); |
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed. |
This issue still exists in Spring Boot 2.2.4. Calling |
hi, maybe this is also caused by the issue #24813 I have created. |
@stijnvanbael, you may be interested in the new |
I use
getContentAsString()
and mockMvc seems to return my Content as ISO 8859-1.Before (with Spring Boot 2.1.8) it was proper UTF-8
When I add a produces to my Endpoint like
@GetMapping(value = "/test", produces={"application/json; charset=UTF-8"})
it works as indented.But I dont want todo this on our big project with tons of endpoints
Example:
Fails with:
Originally posted by @chrisaige in #23622 (comment)
The text was updated successfully, but these errors were encountered: