cURL / Mailing Lists / curl-users / Single Mail

curl-users

HTTP post problem with quoted string as param

From: Vinoth raj <vinoth.amu_at_gmail.com>
Date: Thu, 1 Dec 2011 15:48:08 +0530

Dear Curl users,

I have problem in sending a parameter through HTTP post.
I want to send a parameter with double quotes (say "Quote 3").
I converted the string into UTF-8 as *%e2%80%9cQuote%203%e2%80%9d* and did
a HTTP post to server.
When I receive the request parameter in servlet (using
request.getParemeter) I get *%C3%A2%C2%80%C2%9CQuote%203%C3%A2%C2%80%C2%9D*
In servlet side I am using UTF-8 too. But what is not clear to me is how
*%e2%80%9cQuote%203%e2%80%9d* changed to *
%C3%A2%C2%80%C2%9CQuote%203%C3%A2%C2%80%C2%9D* ( which on decoding gives
junkQuotejunk)*

*Also, the curlopt errorbuffer did not report any error.
I don't want to send the parameter as %22Quote%203%22 but only as *
%e2%80%9cQuote%203%e2%80%9d*

In short, I want send the encoded string *%e2%80%9cQuote%203%e2%80%9d* and
receive at server end as such.

Or, can anyone suggest what is the correct way to send a quoted string as a
parameter in http post?
Some code snippets would be useful.

Thanks,
Vinoth

**

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-12-01