Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 13154 invoked from network); 26 Jul 2007 20:23:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Jul 2007 20:23:13 -0000 Received: (qmail 14785 invoked by uid 500); 26 Jul 2007 20:23:02 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 14758 invoked by uid 500); 26 Jul 2007 20:23:02 -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 14747 invoked by uid 99); 26 Jul 2007 20:23:02 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Jul 2007 13:23:02 -0700 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 [216.148.227.152] (HELO rwcrmhc12.comcast.net) (216.148.227.152) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Jul 2007 13:23:00 -0700 Received: from [192.168.1.101] (c-68-50-0-179.hsd1.va.comcast.net[68.50.0.179]) by comcast.net (rwcrmhc12) with ESMTP id <20070726202237m1200fmdpve>; Thu, 26 Jul 2007 20:22:39 +0000 Message-ID: <46A90276.4060707@christopherschultz.net> Date: Thu, 26 Jul 2007 16:22:14 -0400 From: Christopher Schultz User-Agent: Thunderbird 2.0.0.5 (Windows/20070716) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: URIEncoding References: <46A89645.5000202@unil.ch> <15dcf8060707260613v76444c47ode09ef17ac9b3a9c@mail.gmail.com> <46A8A0D1.90201@unil.ch> <15dcf8060707260806q1d34ddefk3b37f8e42f59e84f@mail.gmail.com> <46A8C00F.9020008@unil.ch> <46A8DDC6.9090703@unil.ch> <46A8F301.4050608@christopherschultz.net> <46A8FACD.4080200@unil.ch> In-Reply-To: <46A8FACD.4080200@unil.ch> X-Enigmail-Version: 0.95.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Frederic, Frederic Bastian wrote: > Christopher Schultz a écrit : >> You want to do this: >> >> java.net.URLEncoder.encode(myParam, >> request.getCharacterEncoding()); >> > > This does not work :) request.getCharacterEncoding() is different > from URIEncoding. The request character encoding > determines in which character encoding the parameters value will be > return to you. My mistake. I meant response.getCharacterEncoding(). > But it doesn't determine in wich character encoding the URI has to be > read. But you aren't reading a URI. You're writing one. I'm assuming that you want to encode a URI for output into a web page. The web page ought to be written using the response's encoding, not the URIEncoding. > What's the problem with URLEncoder ? I don't get you :) Nothing. All the things I mentioned used them at the heart (or should). They just take out the guesswork of which encoding you should be using, and when to apply it. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGqQJ29CaO5/Lv0PARAuhvAJ9vmHBfszi95wQyVlV2o36yZ4N8SQCfTqKN puaAISUt3/OrGna00/8dvk4= =B73f -----END PGP SIGNATURE----- --------------------------------------------------------------------- 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