title: How to handle character encoding in spring RestController
body: <p>I'm trying to find some information on how I should handle character encoding in my <code>RestController</code>.</p>
  
  <p>Spring seems to completely ignore the charset sent in the <code>Content-Type</code> 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.</p>
  
  <p>Here is a GitHub repository with a demo reproducing this scenario: <a href="https://github.com/hawk1234/characterEncodingTest" rel="noreferrer">https://github.com/hawk1234/characterEncodingTest</a></p>
  
  <p>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.</p>
  
  <p><strong>UPDATE 2018-11-01</strong></p>
  
  <p>I've implemented some tests to better show what is the problem. Commit <strong>86dc434351d7ee2c142afc8f389e7837810b19f6</strong> includes class <code>EncodingTest</code> which tests endpoint using different encodings.</p>
  
  <p>I've also implemented my encoding handling (Commit <strong>a26c5da0b25fba8a40e3be41e967e6b1e5c4d546</strong>) however it is very basic implementation and may not take all scenarios into account. I'm still looking for easier solution using existing libraries.</p>