Hi,
in AjaxResponseSender.sendResponse, l. 41, the rendered response is written into the output stream of the httpResponse the following way:
ServletOutputStream out = httpResponse.getOutputStream();
out.print(response);
In my tests, if responses are written in this way, the encoding of the response is not considered - rather, all characters that can not be interpreted in ISO 8859-1, lead to the following exception:
java.io.CharConversionException: Not an ISO 8859-1 character: €
at javax.servlet.ServletOutputStream.print(ServletOut putStream.java:89)
at org.springmodules.xt.ajax.util.AjaxResponseSender. sendResponse(AjaxResponseSender.java:42)
at org.springmodules.xt.ajax.AjaxInterceptor.postHand le(AjaxInterceptor.java:250)
at org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:845)
at org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:774)
However, if I use the response's writer instead of its OutputStream, the encoding (UTF-8, in my case) is correctly considered:
PrintWriter writer = response.getWriter();
writer.print(response);
=> Should the code in AjaxResponseSender be changed to use the writer instead of the OutputStream?
Tanks for any suggestions,
Heiko




