Hi guys, > The problems is often that the text goes trough an extra charset > encodings/decodings when you try to examine it for debugging purposes, > and this can obliterate the traces of the root problem. To spot where > exactly the problem happens, print (e.g. log) the text on various phases > (e.g. when you get the request parameters) with *character codes*, that > is, with numbers. Then check if the printed UCS codes are OK at that > point. (As a catalog of UCS codes you may use "UniBook".)
Adding to Daniel's comment, as it is stated in the javadocs, "This method must be called prior to reading request parameters or reading input using getReader()." So the only feasible solution I find with Struts is using a Filter. > >> http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/ServletRequest.html#setCharacterEncoding(java.lang.String) > >> > >>Using Filter works for me. :) > >> http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/Filter.html And here's an example of what one might look like: public class PolishFilter implements Filter { public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { request.setCharacterEncoding("iso-8859-2"); chain.doFilter(request, response); } } ## I'm leaving out unimplemented methods. Best regards, -- Shinobu -- Shinobu "Kawai" Yoshida <[EMAIL PROTECTED]> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
