Return-Path: Delivered-To: apmail-myfaces-dev-archive@www.apache.org Received: (qmail 80538 invoked from network); 23 May 2006 21:28:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 23 May 2006 21:28:15 -0000 Received: (qmail 32435 invoked by uid 500); 23 May 2006 21:28:08 -0000 Delivered-To: apmail-myfaces-dev-archive@myfaces.apache.org Received: (qmail 32340 invoked by uid 500); 23 May 2006 21:28:08 -0000 Mailing-List: contact dev-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Development" Delivered-To: mailing list dev@myfaces.apache.org Received: (qmail 32301 invoked by uid 99); 23 May 2006 21:28:08 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 May 2006 14:28:08 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of bierbrauen@gmail.com designates 66.249.92.170 as permitted sender) Received: from [66.249.92.170] (HELO ug-out-1314.google.com) (66.249.92.170) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 May 2006 14:28:07 -0700 Received: by ug-out-1314.google.com with SMTP id q2so29559uge for ; Tue, 23 May 2006 14:27:46 -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:content-transfer-encoding:content-disposition:references; b=V+LbKPg+0JfNKaUC5RVHXI1OuR3drCvaFcmTu5bL+YN3MuYMDVbaexxQ9ZZlkiB4u23DllJ7Wgdr+b8GKNubo42dNjqpe9aJqwgFv+qQHF0okXyHSmOFK6fexORZH539e8O5oI0hF/i5ru72shiBJ3ckYQOFv9EgoRon7yK6mI0= Received: by 10.66.166.7 with SMTP id o7mr4955780uge; Tue, 23 May 2006 14:27:46 -0700 (PDT) Received: by 10.66.232.11 with HTTP; Tue, 23 May 2006 14:27:46 -0700 (PDT) Message-ID: <311295120605231427y33cb0435kef19a4560e7d5519@mail.gmail.com> Date: Tue, 23 May 2006 23:27:46 +0200 From: "=?ISO-8859-1?Q?Gerald_M=FCllan?=" To: "MyFaces Development" Subject: Re: character encoding in AJAX requests...suggestions? In-Reply-To: <20060523184057.35849.qmail@web30513.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20060523184057.35849.qmail@web30513.mail.mud.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi, I like the idea of having an own attribute for the char encoding and putting this value to the ajax request. We can set encoding type in the phaselistener without waiting for the explicit call to the component itself. Can be done right at the beginning and also looks like a more generic solution. Doesn`t seem being a hack to me! cheers, Gerald On 5/23/06, sharath reddy wrote: > Hello, > > Here is the gist of TOMAHAWK-208: > > When inputSuggestAjax gets rendered, the > AjaxDecodePhaseListener does not set the content type > of the response to the (expected) > text/html;charset=3DUTF-8 (or whatever). There's not > type or charset specified at all. > > Rumiana then suggests: Maybe "charset=3DUTF-8" should be > specified somewhere as well. > > In a JSF page, it is possible to set the > response.setContentType() attribute: > <%@ page session=3D"false" > contentType=3D"text/html;charset=3Dutf-8"%> > > The problem is, for AJAX requests, how do we specify > the charset explicity, when we want to do so? > > One solution would be to add the 'charset' attribute > to the AJAX component. When the AjaxPhaseListener > invokes the component (by calling 'encodeAjax'), this > attribute can be set on the response. > > The problem with this approach is that the contentType > has to be set BEFORE getWriter() is called on the > Response. So by the time the component is invoked, it > is already be too late. > > Another potential solution is to have the AJAX call to > the server have a 'charset=3D' parameter. The > AjaxPhaseListener will check for this parameter in the > request and set the content-type accordingly in the > response. > > I'm just looking for best way to do this without > seeming like a hack. > > Any ideas/suggestions? > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > --=20 Gerald M=FCllan Schelleingasse 2/11 1040 Vienna, Austria 0043 699 11772506 Bierbrauen@gmail.com