curl-users
Re: UTF-8 encoding during transfer
Date: Wed, 15 Sep 2010 10:53:38 -0700
On Wed, Sep 15, 2010 at 10:42:24AM +0200, Vincent Préau wrote:
> I'm pretty new to curl and I have some issues while transferring files that
> contain UTF-8 encoding ("é", etc.). Files are received OK but the characters
> are messed up and display "Ẵ©" for each special character.
Are you talking about the file names containing UTF-8 or the file data? I'm
assuming the data. File names are a completely different story.
> Note that this issue doesn't occur with FileZilla, so I assume that this is
> linked to the curl command I use...
>
> Is there any command line option that would give me the possibility to managed
> this utf8 characters ?
curl doesn't care what the data you're sending means--it just sends it. How
it's interpreted at the other end is up to the other end.
> For information, the command used to upload my files is :
> curl -u user:pass --disable-epsv -v -ftp-ssl  -E mycert.pem -T test.txt ftp://
> my_ftps_server_ip:2121/test4.txt
You don't say what OS you're running on or what the server is running. curl
doesn't convert the data (on *nix systems this isn't really an issue, but
KNOWN_BUG 21 is for the other cases), but it's possible FileZilla is making
an educated guess and doing some kind of automatic data conversion (e.g. if
it's transferring to a Windows system, it might convert from UTF-8 to CP1252).
If that's the case, you'll have to convert the file yourself before
transferring it with curl, because it's too easy to do it wrong if the
transfer client does it itself.
>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-09-15