cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: how set a unicode or wstring file name for CURLFORM_FILE

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Wed, 2 Mar 2005 23:38:43 +0100 (CET)

On Wed, 23 Feb 2005, Seymen Ertas wrote:

> the following method seems to be working properly if i do not include any
> non-ascii characters in the filename however when i do i still do encounter
> the CURL_READ_ERROR i am not sure if CURL does handle multibyte characters
> correctly or if i am having some sort of a conversion problem.

libcurl has no multibyte support. You should feed it a zero-byte terminated
string, and libcurl uses that. I don't think RFC1867 allows a random "wide
character" string in the file name field, and I know libcurl doesn't like that
since it may contain zeroes before the end of the string.

--
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
       Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2005-03-02