Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 26224 invoked from network); 29 May 2006 18:47:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 29 May 2006 18:47:57 -0000 Received: (qmail 68804 invoked by uid 500); 29 May 2006 18:47:49 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 68246 invoked by uid 500); 29 May 2006 18:47:47 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 68231 invoked by uid 99); 29 May 2006 18:47:47 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 May 2006 11:47:47 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of mgalves@gmail.com designates 64.233.166.181 as permitted sender) Received: from [64.233.166.181] (HELO py-out-1112.google.com) (64.233.166.181) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 May 2006 11:47:46 -0700 Received: by py-out-1112.google.com with SMTP id c30so421107pyc for ; Mon, 29 May 2006 11:47:25 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=pqOR0Rocgt/P1/dYDWnYm8zdqti17jpPiGR7hcCd8xttPON5k1hmF7uugnSJaZwYVeK2IcCefkPEXcHBsNe4nLAcck69kXd8q5zyHgKR2+5tKSxAwLYZ7MDbjyjJa02dxAt8zH71skLCGasdkFDAxnRPEXExD0d+pZNs+SMWk2Q= Received: by 10.35.109.2 with SMTP id l2mr1172185pym; Mon, 29 May 2006 11:47:25 -0700 (PDT) Received: by 10.35.81.15 with HTTP; Mon, 29 May 2006 11:47:25 -0700 (PDT) Message-ID: <52655700605291147w28c73e46t807fd4b5816f8c71@mail.gmail.com> Date: Mon, 29 May 2006 15:47:25 -0300 From: "Miguel Galves" To: "Struts Users Mailing List" , "Martin Gainty" Subject: Re: multipart/form-data and character encoding In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_84089_32911945.1148928445669" References: <424b344b0605291107o30f54602r902f58992805c6b6@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_84089_32911945.1148928445669 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Antonis, we had the same problem with multi part forms. We tried everithing, including enctype in the form tag, URIEncoding, and request.setEncoding...in reset() method. All theses solutions worked fine with all kinds of requests, except for the mulipart, which is handled in a different way. The only solution that really worked for us was to create a subclass of TilesRequestProcessor, and override the handleRequest method as follows: public class ScyllaRequestProcessor extends TilesRequestProcessor { public void process(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { try { request.setCharacterEncoding("UTF-8"); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } super.process(request, response); } To use this processor, just change the controller entry in struts-config.xm= l []s Miguel On 5/29/06, Martin Gainty wrote: > > Good Afternoon Antonis- > > This character encoding issue has been addressed > http://issues.apache.org/struts/browse/STR-2117 as follows > > Set your page to use correct character encoding > <%@ page ....;contentType=3D"text/html" charset=3DUTF-8"%> > > Set form to use correct form encoding > charset=3DUTF-8"> > > Instruct web container to use selected charset when creating request (in > server.xml) > > > HTH, > Martin -- > ----- Original Message ----- > From: "Antonis Lebesis" > To: > Sent: Monday, May 29, 2006 2:07 PM > Subject: multipart/form-data and character encoding > > > Hi, > I 've searched the archives but haven't found any solution to my > latest problem. I have with a input and a > input. The problem is that request.getCharacterEncoding() returns null > and the text input is considered to be in iso-8859-1 encoding. In the > corresponding ActionForm's reset(), I have added the following line: > request.setCharacterEncoding("ISO-8859-7"); > > In forms that don't have a input, the character set is > correct. The problem occurs only in this form and from what I 've > found it is caused by the fact that in the form declaration I have > added enctype=3D"multipart/form-data". > > Has anyone solved this problem? > > Thanks, > Antonis > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org > For additional commands, e-mail: user-help@struts.apache.org > > --=20 Miguel Galves - Engenheiro de Computa=E7=E3o J=E1 leu meus blogs hoje? Para geeks http://log4dev.blogspot.com Pra pessoas normais http://miguelgalves.blogspot.com "N=E3o sabendo que era imposs=EDvel, ele foi l=E1 e fez..." ------=_Part_84089_32911945.1148928445669--