Return-Path: Delivered-To: apmail-jakarta-jmeter-user-archive@www.apache.org Received: (qmail 48715 invoked from network); 21 Apr 2005 23:32:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Apr 2005 23:32:29 -0000 Received: (qmail 81448 invoked by uid 500); 21 Apr 2005 23:32:47 -0000 Delivered-To: apmail-jakarta-jmeter-user-archive@jakarta.apache.org Received: (qmail 81146 invoked by uid 500); 21 Apr 2005 23:32:46 -0000 Mailing-List: contact jmeter-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "JMeter Users List" Reply-To: "JMeter Users List" Delivered-To: mailing list jmeter-user@jakarta.apache.org Received: (qmail 81133 invoked by uid 99); 21 Apr 2005 23:32:45 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=RCVD_BY_IP X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of sebbaz@gmail.com designates 64.233.170.196 as permitted sender) Received: from rproxy.gmail.com (HELO rproxy.gmail.com) (64.233.170.196) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 21 Apr 2005 16:32:45 -0700 Received: by rproxy.gmail.com with SMTP id c51so536067rne for ; Thu, 21 Apr 2005 16:32:24 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=QluakXla7HVwc2vxeetyNEA+36L1IhhgDdTDyXDgvO9ywvDjXyaGD7CXB/CR6huWPVoHWDSCv7Ep7m7IilJrEP58xTFoPuPVXF5neX6tEY8Zgyky0+Yt/LqvDmuS1dG6JrJhpXFa/uO4D8UFF0jjENMo+Yw5Kc53RQBG4FJ3YNc= Received: by 10.11.99.40 with SMTP id w40mr66501cwb; Thu, 21 Apr 2005 16:32:23 -0700 (PDT) Received: by 10.11.118.40 with HTTP; Thu, 21 Apr 2005 16:32:23 -0700 (PDT) Message-ID: <25aac9fc05042116321f11c918@mail.gmail.com> Date: Fri, 22 Apr 2005 00:32:23 +0100 From: sebb Reply-To: sebb To: JMeter Users List Subject: Re: Encoding of variables on an HTTP Post gives strange results In-Reply-To: <795AE66CDD45774DB1748CA2723BE45001CA2FB5@GBMK-EXCH2.eu.uis.unisys.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <795AE66CDD45774DB1748CA2723BE45001CA2FB5@GBMK-EXCH2.eu.uis.unisys.com> X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Yes, it does default to UTF-8 in EncoderCache (encode) and HTTPArgument (de= code) This is most likely because of the following comment in the JavaDoc for=20 java.net.URLEncoder.encode(String s, String enc) ... Note: The World Wide Web Consortium Recommendation states that UTF-8 should be used. Not doing so may introduce incompatibilites. S. On 4/21/05, Sweet-Escott, John wrote: > I have done some more investigation into this on my machine. The followin= g java class: > public class Default { > public static void main(String[] args) { > System.out.println("Encoding: " + System.getProperty("fil= e.encoding")); > System.out.println(java.net.URLEncoder.encode(args[0])); > } > } >=20 > Yields: > >java -Dfile.encoding=3DUTF-8 Default =FF > Encoding: UTF-8 > %C3%BF >=20 > >java Default =FF > Encoding: Cp1252 > %FF > ... which would indicate that somewhere in JMeter the default encoding is= being set up for UTF-8 > John >=20 > -----Original Message----- > From: Michael Stover [mailto:mstover1@apache.org] > Sent: 21 April 2005 16:29 > To: jmeter-user@jakarta.apache.org > Subject: Re: Encoding of variables on an HTTP Post gives strange results >=20 > It's possible this is a case where the UrlEncode.encode() method needs a > locale passed to it to work correctly - which is a new method in jdk1.4 > only, whereas JMeter tries to be jdk1.3 compatible. >=20 > I'm not sure which locale you're in - are you using the default locale > for your region or is your computer set up with a different locale > setting? >=20 > -Mike >=20 > On Thu, 2005-04-21 at 16:11 +0100, sebb wrote: > > Which version of JMeter? JVM? OS? > > > > Does the same behaviour occur with GET parameters? > > > > It might perhaps be a problem with the default platform encoding which > > could lead Jmeter to think the input was different. > > Just a thought. > > > > I may have time to investigate this tonight. > > > > S. > > On 4/21/05, Sweet-Escott, John wrote: > > > Hi > > > > > > I have a jmeter variable that contains the string A=FF (that is a cap= ital A (ASCII 65) followed by y umlaut (ASCII 255)... in case this gets man= gled by email). > > > > > > When I use this variable in the HTTP sampler as a POST variable with = encoding enabled it is encoded as A%C3%BF (that is A followed by A tilde (A= SCII 195) followed by upside down question mark (ASCII 191)) in the request= . This does not seem right. > > > > > > If I do not encode, it is sent as y umlaut (which actually seems to w= ork...). However I do need the encoding when the variable contains the valu= e A% (which is encoded correctly as A%25. > > > > > > Any thoughts... could this be a problem with handling ASCII values > = 127? > > > > > > Regards > > > John > > > >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org >=20 > --------------------------------------------------------------------- To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: jmeter-user-help@jakarta.apache.org