cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: Encoding problem - please help

From: ValueCD WebMaster <webmaster_at_valuecd.com>
Date: Thu, 29 Aug 2002 00:00:52 -0700

>
>
> I'm with Daniel on that - looks like the exact
> same url.

It was my typo:
The first URL was
http://www.musicline.de/de/artist/Pege%A5Wilfer%A5Pauer%A5Pe
ge
the second one was supposed to be
http://www.musicline.de/de/artist/Pege/Wilfer/Pauer/Pege
(= un-encoded).
I have cut+pasted it and forgot to edit
before sending the email.

> To go further, I
> pulled that url on a Linux box and was able to
> grep for Pege and it looked
> right. It had %A5 in it, for sure, but that's
> because that character has to be
> encoded to be able to pass unscathed through the
> web server/browser.
>
> I see a "font class=name>Pege/Wilfer/Pauer/Pege"
> line and a line with an html
> link that has the encoded %A5s in the href and
> the unencoded
> "Pege/Wilfer/Pauer/Pege" as the displayed tag text.

Actually, the server has sent you a wrong page
(a substitute).
It understood only the first word from the URL
("Pege") and has sent you a result page WITH
A LINK to the correct page instead of the correct
page itself - which is exactly the link above,
the one I have had the problem with.

So it looks like even Linux has a problem with
multiple "%" statements (I am on Win32 platform).

> Ralph

All of the above notwithstanding, thank you for
responding, Ralph, I appreciate it.

And of course thanks to Daniel; he actually solved
my problem by writing "Your shell or something
eats the % letters" - it turned out I had to
DOUBLE the % characters to get it right.

So the correctly encoded URL is
http://www.musicline.de/de/artist/Pege%%A5Wilfer%%A5Pauer%%A
5Pege
(= each %-character doubled)
and it brings the correct page back from the server.

Thanks again for your help!!

>
>
> Daniel Stenberg wrote:
>
> > On Wed, 28 Aug 2002, ValueCD WebMaster wrote:
> >
> > > However, when I try to download it with curl
> > >
> > > curl -o local.HTM
> > >
> http://www.musicline.de/de/artist/Pege%A5Wilfer%A5
Pauer%A5Pe
> > ge
> >
> > then I get a page where the artist line is changed from
> >
> > Pege/Wilfer/Pauer/Pege to
> > PegeA5PauerA5Pege
>
> You're using Windows, right? Your shell or something eats
the % letters. FAQ
> question 4.2 => http://curl.haxx.se/docs/faq.html
>
> > If I leave the string unencoded:
> >
> > curl -o local.HTM
> >
http://www.musicline.de/de/artist/Pege%A5Wilfer%A5Pauer%A5Pe
> > ge
>
> This is the exact same URL.
>
> --
> Daniel Stenberg -- curl related mails on curl related
mailing lists please

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2002-08-29