cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-users Mailing List Archives

Re: How to handle non-ASCII characters in URLs

From: G. T. Stresen-Reuter <tedmasterweb_at_gmail.com>
Date: Fri, 9 Jan 2009 19:12:37 +0000

On Jan 9, 2009, at 6:50 PM, Dan Fandrich wrote:

> On Fri, Jan 09, 2009 at 05:50:50PM +0000, G. T. Stresen-Reuter wrote:
>> If I am trying to delete a file named "espaņa.txt", what would the
>> curl
>> command look like?
>>
>> curl -u "user:password" "ftp://domain.com/espa%f1a.txt" -Q "dele /
>> espaņa.txt"
>>
>> The above returns a FTP 550 error.
>>
>> I assume the "ņ" needs to be percent encoded, but I was hoping for
>> some
>> confirmation/enlightenment before heading down that path with my
>> script.
>
> RFC2640 standardizes internationalized pathnames for FTP and states
> that
> compliant servers will support UTF-8. This means that the URL
> ftp://domain.com/espa%c3%b1a.txt will work for those servers.
> Noncompliant
> servers could user other encodings. For ISO-8859-1, the URL
> ftp://domain.com/espa%f1a.txt should work. Some servers could
> support detect
> the coding and support both.
>
>>
> Dan

Actually, another way to debug these things is to watch the logs on
the server. Does anyone know where the server logs are for ProFTP and
how to increase verbosity? I've been unable to find the answer to this
question in their online documentation (or rather, the things I've
tried don't seem to work on my server).

Thanks again.

Ted S-R

-------------------------------------------------------------------
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

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET