curl-library
Re: Simple encoding problem (perhaps :-) )
Date: Wed, 3 Nov 2004 16:28:18 -0000
I'm a python user too.
Try to make your python code as simple as possible with the same problem and
send it, Ill run it myself/see the code more clearly.
> pf="H1APPA5=IST%23&(many other fields)"
Beware that in python (like some other languages) the % has a special
meaning (and waits for an input on the right of the string) or it could be
the use of ["] and ['].
One of the good trick in python that quickly solves string interpretations
problems is to use the special python strings with ''' like
mystr = '''H1APPA5=IST%23&(many other fields)'''
which can greatly help sometimes especially if you dont want to bang your
head on special characters like affecting a complete web page as a test.
''' means 3 times the single [']
____________________
<Gu>[W]ill[i]a<u>m<e>
http://www.lacde.net
----- Original Message -----
From: "Nico Alberti" <nico.alberti_at_gmail.com>
To: <curl-library_at_cool.haxx.se>
Sent: Wednesday, November 03, 2004 4:07 PM
Subject: Simple encoding problem (perhaps :-) )
> Hi everybody,
>
> I am having problems trying to make a POST submission in a python
> program. Other POSTs are fine, while this is giving me lots of
> troubles probably (I think) because of encoding problems.
>
> Infact, while if I try to use curl from the DOS command line this way
> (of course I have a lot more data to POST):
>
> curl --data "H1APPA5=IST%23&(many other fields)" https://my.web.page
> everything works fine, while in Python something like
>
> pf="H1APPA5=IST%23&(many other fields)"
> an then the canonical calls to the curl post commands give me a
> completely different set of data (I get only a page with some low
> privilege data).
>
> This is probably more a Python problem (I am a newbie there) than a
> Curl one, so sorry if the post is not perfectly on topic, but I am
> stuck.
>
> Thank you in advance, any help will be greatly appreciated.
> --
> Ciao
> Nico
>
--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.764 / Virus Database: 511 - Release Date: 17/09/2004Received on 2004-11-03