title: Bad encoding of streamed CSV with Stripes / Tomcat
body: <p>Actually i'm trying to stream a CSV file. I set the encoding to windows-1252 but it seems it is still streamed as UTF-8 file.</p>
  
  <pre><code>   final String encoding = "windows-1252";
     exportResolution = new StreamingResolution(builder.getContentType() + ";charset=" + encoding.toLowerCase()) {
          @Override
          public void stream(HttpServletResponse response) throws Exception {
              // Set response headers
              response.setHeader("Cache-control", "private, max-age=0");
              response.setCharacterEncoding(encoding);
              OutputStream os = response.getOutputStream();
              writeExportStream(os,builder);
          }
      }.setFilename(filename);
  </code></pre>
  
  <p>writeExportStream just streams the content to the outputstream (with pagination and db calls, it takes some time)</p>
  
  <p>It doesn't work in local (jetty plugin) + dev (tomcat) Neither with firefox / chrome</p>
  
  <p>I've not tested but people at work told me that it works better when we don't stream the content but we write the file in one time after having loaded all the objets we want from db.</p>
  
  <p>Anybody know what is happening? Thanks</p>
  
  <p>Btw my headers:</p>
  
  <pre><code>HTTP/1.1 200 OK
  Content-Language: fr-FR
  Content-Type: text/csv;charset=windows-1252
  Content-Disposition: attachment;filename="export_rshop_01-02-11.csv"
  Cache-Control: private, max-age=0
  Transfer-Encoding: chunked
  Server: Jetty(6.1.14)
  </code></pre>
  
  <p>I want the file to be able to be imported in excel in windows-1252 but i can't, it just open in utf8 while my header is windows-1252</p>