title: spring mvc jquery ajax response as json encoding issue
body: <p>Recenlty I have big problem with Polish Characters in JSON response from the server. I have simple Ajax request for this:</p>
  
  <pre><code>jQuery.ajax( "/GetSimpleRuleList",
      {
          type:"GET",
          responseType:"application/json;charset=utf-8",
          contentType:"application/json;charset=utf-8",
          cache:false
      } ).done( function ( data )
      {
          console.log( data );
          //nevermind here
      } );
  </code></pre>
  
  <p>And appropriate Controller at server end:</p>
  
  <pre><code>@RequestMapping(value = "/GetSimpleRuleList", method = RequestMethod.GET)
  public
  @ResponseBody
  String getRuleList( ServletResponse response )
  {
      //magically getting my list here
       response.setCharacterEncoding( "UTF-8" );
      return //Using JACKSON ObjectWriter here
  }
  </code></pre>
  
  <p>Now I'm 100% sure that encoidng on server side and database from where I take data from is OK, no problem with that.
  But when It comes to reading response from server it is:</p>
  
  <pre><code>???
  </code></pre>
  
  <p>instead of Polish char like:</p>
  
  <pre><code>ąćź
  </code></pre>
  
  <p>Moreover it only fails when receiving response from server, while sending a request with data is encoded correctly.</p>
  
  <p>In my web.xml I have filter for character encoding.</p>
  
  <p>Any help with this? I'm out of ideas.</p>