cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: How to handle non-ASCII characters in URLs

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Fri, 9 Jan 2009 11:41:29 -0800

On Fri, Jan 09, 2009 at 07:10:41PM +0000, G. T. Stresen-Reuter wrote:
> Thanks for the pointer. This was what I was expecting, so I tried the
> %c3%b1 version and got the following response:
>
> > dele /httpdocs/samples/espa%c3%b1a.txt
> < 550 /httpdocs/samples/espa%c3%b1a.txt: No such file or directory
> * QUOT command failed with 550
>
> Since I'm running this from a script and the file name is coming in
> through a parameter, I also tried the command directly from my terminal
> with no luck.
>
> Maddeningly my FTP client (CyberDuck) handles such situations just fine,
> without a hitch. Wish I knew more about this stuff...
>
> Is there any way to tell what encoding the server is using?

If you see a line "UTF8" appearing in the features list output of the command:

curl -v --head -Q FEAT ftp://domain.com/

then the server supports UTF-8 pathnames. Otherwise, you'll have to read
the manual or experiment because it's nonstandard.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2009-01-09