PrintingResultHandler in MockMvc should infer UTF-8 encoding for JSON response #27926
Labels
in: test
Issues in the test module
in: web
Issues in web modules (web, webmvc, webflux, websocket)
type: enhancement
A general enhancement
Milestone
As explained in #27846 (comment), the
PrintingResultHandler
does not infer UTF-8 encoding for a response with content typeapplication/json
. Consequently, UTF-8 characters in such a response will be garbled in the output from thePrintingResultHandler
.Since
PrintingResultHandler
is effectively a client of the application (similar to the role a web browser plays), thePrintingResultHandler
should infer the response encoding to be UTF-8 if the content type isapplication/json
.The text was updated successfully, but these errors were encountered: