Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 7951 invoked from network); 20 Feb 2007 03:57:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Feb 2007 03:57:09 -0000 Received: (qmail 63746 invoked by uid 500); 20 Feb 2007 03:57:08 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 63019 invoked by uid 500); 20 Feb 2007 03:57:05 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 63007 invoked by uid 99); 20 Feb 2007 03:57:05 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Feb 2007 19:57:05 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [204.127.225.91] (HELO alnrmhc11.comcast.net) (204.127.225.91) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Feb 2007 19:56:53 -0800 Received: from [192.168.1.101] (c-68-34-228-109.hsd1.md.comcast.net[68.34.228.109]) by comcast.net (alnrmhc11) with ESMTP id <20070220035632b11002vfhse>; Tue, 20 Feb 2007 03:56:32 +0000 Message-ID: <45DA7178.3090805@alum.american.edu> Date: Mon, 19 Feb 2007 22:56:40 -0500 From: Ramez Ghazzaoui User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: request.getParameter() in JSP misinterpreting foreign characters References: <45DA0C20.4070405@alum.american.edu> <200702200128.32537.mailing-tomcat-user@schoenhaber.de> In-Reply-To: <200702200128.32537.mailing-tomcat-user@schoenhaber.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Thank you guys. Sounds like I need to either write or find a method that converts strings to UTF-8. I'll try this tomorrow. BTW I am not using HTML forms, just building URIs dynamically and sticking them into anchors. That's where the GET part comes into play :) Cheers, -Ramez Markus Sch�nhaber wrote: > Ramez Ghazzaoui wrote: > > >> Today I realized that this very solution has broken the Java >> request.getParameter() method in JSP. Now, with the URIEncoding set to >> UTF-8, this Java method is misinterpreting non-English characters. When >> I invoke from the browser the following address: >> http://localhost/main.jsp?path=ol� (or the equivalent >> http://localhost/main.jsp?path=ol%E9) a call to >> request.getParameter("path") from within main.jsp returns ol? where the >> question mark is character number 65533. That's way off from 233 (which >> is the correct U-dec for eacute, or �). >> > > If you tell Tomcat that you'll provide URIs which are encoded in UTF-8 then do > as you said and provide UTF-8-encoded URIs. Your example above should > therefore look like > http://localhost/main.jsp?path=ol%C3%A9 > > If you're using HTML-forms with method="GET", set the accept-charset attribute of the form to UTF-8. > > --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org