title: Spring MVC response encoding issue
body: <p>In last few hours I've read a lot concerning this topic, and so far nothing has worked. I'm trying to return response containing "odd" some characters. Here is example of that, quite simple :</p>
  
  <pre><code>@ResponseBody
      @RequestMapping(value="test")
      public String test(){
          String test = "čćžđš";
          System.out.println(test);
          logger.info(test);
          return test;
      }
  </code></pre>
  
  <p>This is my <a href="http://pastebin.com/T1ePH74F" rel="nofollow noreferrer">web.xml</a>, because I found some answers where CharacterEncodingFilter helped(not in my case though). I used POST method because I read this applies to POST.</p>
  
  <p>Also found this <a href="https://stackoverflow.com/questions/3616359/who-sets-response-content-type-in-spring-mvc-responsebody/3617594#3617594">answer</a>(related). Didn't help as well.</p>
  
  <p>When I debug it the correct value appears, but when I print it doesn't as it can be seen below:</p>
  
  <p><img src="https://i.stack.imgur.com/cNegv.jpg" alt="enter image description here"></p>
  
  <p>When I test it from jmeter, the response seems to be OK, <code>Content-Type</code> is <code>text/html;charset=UTF-8</code></p>
  
  <p>Here is a screenshot of that as well. <a href="http://i56.tinypic.com/14lt653.jpg" rel="nofollow noreferrer">http://i56.tinypic.com/14lt653.jpg</a></p>
  
  <p>I think the right way is to return UTF-8, maybe I'm wrong.</p>