You're confused because URL:ENCODE-STRING has nothing to do with "url
encoding", which the encoding used for
application/x-www-form-urlencoded (and which itself has nothing to do
As the code comment says, this is just a backwards compatibility
procedure for something that existed in the code base a couple of
years ago. Don't use it.
The procedure you're looking for is ENCODE-WWW-FORM-URLENCODED .
On Wed, May 2, 2012 at 4:21 AM, <craven@gmx....> wrote:
> Hello fellow Schemers!
> I may misunderstand things here, but isn't URL:ENCODE-STRING meant to
> propertly encode characters that are special to urls? Examples would be
> =, & and ; (which should all be encoded). However,
>> (url:encode-string "a=b&b=c;c=d")
> just echoes that string literally ("a=b&b=c;c=d") without any encoding.
> This is by design, as these characters are explicitly added to
> URL:CHAR-SET:UNESCAPED in runtime/url.scm.
> Is this implementation based on a different understanding of
> url-encoding? What am I missing here? I'm trying to use it to url-encode
> the name and value of cookies for HTTP, which necessarily means it must
> encode at least = and ; correctly.
> Thanks for any help!
> MIT-Scheme-devel mailing list
> MIT-Scheme-devel@gnu.... > https://lists.gnu.org/mailman/listinfo/mit-scheme-devel