cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: urls with spaces - curl is misinterpreting the %20 code

From: Jason Soled <jsoled_at_broadware.com>
Date: Wed, 14 Dec 2005 14:13:17 -0500

Both + and %%20 work. I'm going with %%20 because I don't know if our server
will break if it gets + and doesn't expect it... Though it seemed to work.

Thanks all.
-----Original Message-----
From: curl-users-bounces_at_cool.haxx.se
[mailto:curl-users-bounces_at_cool.haxx.se] On Behalf Of Dan Fandrich
Sent: Wednesday, December 14, 2005 1:52 PM
To: curl-users_at_cool.haxx.se
Subject: Re: urls with spaces - curl is misinterpreting the %20 code

On Wed, Dec 14, 2005 at 01:37:10PM -0500, Jason Soled wrote:
> I am using the following in a windows/dos batch file:
[...]
> Why is it interpreting the %20 as a zero instead of a space? What can
> I do about this?
>
> I am using version 7.15.1 without SSL.

DOS treats %N (where N is a digit) as a positional parameter within batch
files. Since you haven't given any parameters, the %2 is replaced by
nothing, leaving the 0. You need to escape the percents by doubling them.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2005-12-14