The HttpServletResponse object is responsible for wrapping the PrintWriter around the response stream. From the JavaDoc for HttpServletResponse.getWriter() method...
The character encoding used is the one specified in the charset= property of the setContentType(java.lang.String) method, which must be called before calling this method for the charset to take effect.
So, the response object will use the appropriate encoding.
James Carman, President<br />Carman Consulting, Inc.
Joined: Mar 03, 2005
thanks a lot for your quick answer. You brought me a step further. So the PrintWriter does not necessarily convert into Unicode, right?
What happens in the background when following code gets executed: