cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: UTF-8 encoding during transfer

From: Vincent Préau <vincent.preau+pro_at_gmail.com>
Date: Wed, 15 Sep 2010 23:33:40 +0200

On Wed, Sep 15, 2010 at 7:53 PM, Dan Fandrich <dan_at_coneharvesters.com>wrote:

> 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.
>
>
Indeed I forgot to mention that, but you're right I'm talking about the file
data ...

> > 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.
>
>
That's what I thought until my tests successful with FileZilla...

> > 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.
>
>
curl is running on a Linux client, where files are simply created with vi.
The FTPS server is an AIX server so I really can't guess where it's going
wrong... I'll try to look at more details (if available) in FZ logs in order
to check if there's an implicit conversion or something like that.

> >>> Dan
>

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

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