on-internet
← Community

How to handle character encoding in spring RestController

Stack Overflow ·

I'm trying to find some information on how I should handle character encoding in my RestController. Spring seems to completely ignore the charset sent in the Content-Type header. No matter which charset is sent to the server using this header, the server tries to read it as UTF-8 and sends response with charset UTF-8. Here is a GitHub repository with a demo reproducing this scenario: https://github.com/hawk1234/characterEncodingTest Can someone point me where is it described in spring documentation? I came across Content Negotiation but I think it is more about response format rather then enco

Comments

Sign in or sign up to comment and upvote.

No comments yet.