cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: Escaping URL's (was Japanese characters in URL)

From: Nielsen Linus <Linus.Nielsen_at_elema.siemens.se>
Date: Tue, 8 May 2001 08:06:32 +0200

> I believe that they're are routines out there that will
> correctly handle
> this situation, and will only encode data that needs
> encoding, in which
> case this wouldn't be problem...

But the question remains. How is this routine supposed to know
when the data "needs encoding"?

How does it decide that the string "Hello%20World" is to be
escaped or not? Imagine a CGI that takes a URL formatted string
as input. Then curl would have to escape the "%", otherwise the
CGI would receive "Hello World", which would be wrong.

Curl can't possibly know that this particular CGI _wants_ the
string in this URL-encoded format.

I can't think of any automatic way of solving this.

/Linus
Received on 2001-05-08