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 encoding.
UPDATE 2018-11-01
I've implemented some tests to better show what is the problem. Commit 86dc434351d7ee2c142afc8f389e7837810b19f6 includes class EncodingTest which tests endpoint using different encodings.
I've also implemented my encoding handling (Commit a26c5da0b25fba8a40e3be41e967e6b1e5c4d546) however it is very basic implementation and may not take all scenarios into account. I'm still looking for easier solution using existing libraries.