ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.


AddThis Social Bookmark Button
  Two Servlet Filters Every Web Application Should Have
Subject:   Cause: hardcoded charset encoding
Date:   2003-12-01 16:28:22
From:   knuterik
Response to: MAJOR bug in compression filter for non-US webapps

In GZIPResponseWrapper.java:

writer = new PrintWriter(
new OutputStreamWriter(stream, "UTF-8"));

Should maybe instead check for current encoding of output stream, and then continue using it?