title: How to set char encoding to utf-8 in JAX-RS Jersey 2.0 Response
body: <p>I`ve written a RESTService that creates a PDF and returns it via Response Object.</p>
  
  <p>Here is my Client:</p>
  
  <pre><code>    final Response response = target.request(MediaType.APPLICATION_OCTET_STREAM).post(Entity.entity(building, MediaType.APPLICATION_JSON + ";charset=utf-8"));
      int responseCode = response.getStatus();
      String fileName = Response.getHeaderString("fileName");
  </code></pre>
  
  <p>And here is the important part of my Web Service method:</p>
  
  <pre><code>    return Response.ok(report, MediaType.APPLICATION_OCTET_STREAM).header("fileName", reportName).build();
  </code></pre>
  
  <p>My problem is that the umlauts of my filename are just erased:
  So for example, if the fileName is : "Gebäude2_2014" the Client will receive "Geb ude2_2014".</p>
  
  <p>Anybody an idea?</p>