curl-and-python

Re: Uploading files with UTF-8 names

From: Zdenek Pavlas <zpavlas_at_redhat.com>
Date: Mon, 10 Jun 2013 05:31:48 -0400 (EDT)

> If I don't convert the filename, everything goes flawlessly if the
> name contains English and/or Russian letters. However, if there is an
> å, for example, CURL throws error 26.

> If, however, I convert the filename to UTF-8:
> local_filename = filename.encode("utf8")
> then error 26 is thrown at me even the filename contains Russian
> letters.
> Could you help me, please?

I'd try os.stat() for both encodings in turn, then send to pycurl
the one that worked.

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