curl-and-python

Re: Uploading files with UTF-8 names

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 9 Jun 2013 23:38:02 +0200 (CEST)

On Sun, 9 Jun 2013, Andre Polykanine wrote:

> but I was suggested to write to a mailing list

For help with anything curl or libcurl, the mailing lists are certainly way
better than stackoverflow to get accurate answers.

> The thing is that I can't upload a file that has in its name letters not
> being in the encoding that is set for non-unicode programs in Windows.

You need to separate the name of the local file and the name as you want it to
appear to the other side.

With libcurl's curl_formadd() function you provide the local file name to
CURLFORM_FILE but you can then provide whatever file name you want it to have
in the CURLFORM_FILENAME option - completely independent from what the local
name is.

-- 
  / daniel.haxx.se
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-python
Received on 2013-06-09