Bad encoding of streamed CSV with Stripes / Tomcat
问题 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. 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 =