curl-and-python
Re: Uploading files with UTF-8 names
From: Andre Polykanine <andre_at_oire.org>
Date: Mon, 10 Jun 2013 14:18:50 +0300
Date: Mon, 10 Jun 2013 14:18:50 +0300
Hello Zdenek,
os.stat() here doesn't work either, it says "System cannot find file
specified", because it turns unicode chars into \xe0, \xa9 etc. in the
path.
-- With best regards from Ukraine, Andre Skype: Francophile My blog: http://oire.org/menelion (mostly in Russian) Twitter: http://twitter.com/m_elensule Facebook: http://facebook.com/menelion ------------ Original message ------------ From: Zdenek Pavlas <zpavlas_at_redhat.com> To: curl with python Date created: , 12:31:48 PM Subject: Uploading files with UTF-8 names > 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 _______________________________________________ http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-pythonReceived on 2013-06-10