Hello,

After a long process of elimination, I've discovered that the TeeFilter (ch.qos.logback.access.servlet.TeeFilter) is causing problems with page encoding.

Logback: 1.0.13,
Tomcat: 7.0.61,
Java: 1.7_0_51 (and 1.6.0_39).

At the top of my jsp pages I have this line:

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

setting the character set to UTF-8.  When I have the TeeFilter installed in the web.xml, unicode characters do not encode correctly.  The resulting html page claimed to be UTF-8 in its header, but did not appear correctly when interpreted as UTF-8 or iso-8859-1.  (I don't know what encoding it was actually using).

For now, my workaround is to remove the TeeFilter since my dependence on it is very low, but I would like to be able to add it back if needed.

Another detail about this that confuses me even more, is that it would fail 100% of the time when tomcat was first started.  But if I redeployed the .war files, it would start working and the pages would be encoded correctly.  (This made tracking the problem down a much longer process).

Has anyone else run into this or is there a setting on the TeeFilter to specify an encoding?

--
Chris Holt
Director of Development
Healthcare Control Systems
(877)877-8795 ext 115