Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 73627 invoked from network); 3 Feb 2005 11:38:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 3 Feb 2005 11:38:41 -0000 Received: (qmail 20367 invoked by uid 500); 3 Feb 2005 11:38:20 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 20343 invoked by uid 500); 3 Feb 2005 11:38:20 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 20330 invoked by uid 99); 3 Feb 2005 11:38:20 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from p15132671.pureserver.info (HELO smtp.codebeamer.com) (217.160.209.121) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 03 Feb 2005 03:38:18 -0800 Received: by smtp.codebeamer.com (Postfix, from userid 648) id EDE3F118111; Thu, 3 Feb 2005 12:38:14 +0100 (CET) Received: from xlap (p508AB18C.dip.t-dialin.net [80.138.177.140]) by smtp.codebeamer.com (Postfix) with ESMTP id 5C9A41180FA for ; Thu, 3 Feb 2005 12:38:11 +0100 (CET) From: "Zsolt Koppany" To: "'Tomcat Users List'" Subject: RE: Does from a filter setCharacterEncoding work for tc-5.0.27? Date: Thu, 3 Feb 2005 12:38:08 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook, Build 11.0.6353 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 Thread-Index: AcUJkeP/dQSNfHCOTWSIBWncgkhYwgAPbEsgAABRDoAABORNIA== In-Reply-To: <05F7777636653C48883BE6FF7FFC64C50368B8@neon.ALLOT.LOCAL> Message-Id: <20050203113811.5C9A41180FA@smtp.codebeamer.com> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on p15132671.pureserver.info X-Spam-Level: X-Spam-Status: No, hits=-94.1 required=4.0 tests=AWL,MAILTO_TO_SPAM_ADDR, MSGID_FROM_MTA_SHORT,RCVD_IN_DYNABLOCK,RCVD_IN_NJABL, RCVD_IN_NJABL_DIALUP,RCVD_IN_SORBS,RCVD_IN_SORBS_WEB, USER_IN_WHITELIST autolearn=no version=2.63 X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Here is my code. It doesn't matter what the variable encoding contains. = I didn't write it in my previous email but I don't have problems with = forms (I use struts) but with links that contain parameters encoded in "UTF8". public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException,ServletException { dump(request, response); } protected void dump(ServletRequest request, ServletResponse response) { try { String encoding =3D "ISO8859-1"; encoding =3D "UTF8"; request.setCharacterEncoding(encoding); response.setCharacterEncoding(encoding); } catch (UnsupportedEncodingException e) { log.error(e); } for (Enumeration en =3D request.getParameterNames(); en.hasMoreElements(); ) { String pn =3D (String)en.nextElement(); String pv =3D request.getParameter(pn); log.debug("Parameter <" + pn + "> value: <" + pv + ">"); } } > -----Original Message----- > From: Guy Katz [mailto:gkatz@allot.com] > Sent: Thursday, February 03, 2005 10:17 AM > To: Tomcat Users List > Subject: RE: Does from a filter setCharacterEncoding work for = tc-5.0.27? >=20 > i used TC 5.0.19,0.25,0.27 &0.30 with a UTF-8 encoding filter (setting > request and response encoding) and i never had any problems :) (and of > course i use a language that cannot be represented with latin-1). >=20 > -----Original Message----- > From: Zsolt Koppany [mailto:zkoppanylist@intland.com] > Sent: Thursday, February 03, 2005 11:07 AM > To: 'Tomcat Users List' > Subject: RE: Does from a filter setCharacterEncoding work for = tc-5.0.27? >=20 >=20 > Thank you, but we cannot move to 5.5.4. How can I do the same with > tc-5.0.27? >=20 > Zsolt >=20 > > -----Original Message----- > > From: A jie [mailto:ajie2000@msn.com] > > Sent: Thursday, February 03, 2005 2:44 AM > > To: tomcat-user@jakarta.apache.org > > Subject: RE: Does from a filter setCharacterEncoding work for = tc-5.0.27? > > > > > > > > > > > > ---------------------- > > MSN:Ajie2000@msn.com > > QQ:29967409 > > --------------------- > > > > > > > > > > >From: "Zsolt Koppany" > > >Reply-To: "Tomcat Users List" > > >To: "'Tomcat Users List'" > > >Subject: Does from a filter setCharacterEncoding work for = tc-5.0.27? > > >Date: Wed, 2 Feb 2005 15:33:07 +0100 > > > > > >Hi, > > > > > >Does setCharacterEncoding work under tc-5.0.27 with java-1.4.2-06? = To > get > > >UTF-8 request parameter I need to do: > > > > > >String par =3D request.getParameter("filename"); > > >String filename =3D new String(par.getBytes("ISO8859-1"), "UTF-8"); > > > > > >request.setCharacterEncoding("UTF-8") doesn't seem to help from a > filter. > > > > > >Is it my mistake? > > > > > > > > >Zsolt Koppany > > >Phone: +49-711-722 1874 > > >-- > > >Intland Software GmbH, Schulze-Delitzsch-Strasse 16 > > >D-70565 Stuttgart, Germany > > >Phone: +49-711-722 1873, e-mail:zsolt.koppany@intland.com > > >Fax: +49-711-722 1835 > > > > > > > > > > > > > > > > > > > > = >--------------------------------------------------------------------- > > >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > > >For additional commands, e-mail: = tomcat-user-help@jakarta.apache.org > > > > > > > it works success under tomcat5.5.4.you should conf a web.xml > > > > _________________________________________________________________ > > = =D3=EB=C1=AA=BB=FA=B5=C4=C5=F3=D3=D1=BD=F8=D0=D0=BD=BB=C1=F7=A3=AC=C7=EB=CA= =B9=D3=C3 MSN Messenger: http://messenger.msn.com/cn > > > > > > = --------------------------------------------------------------------- > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org >=20 >=20 >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org