cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Upload failed for a file having unicode characters in its name

From: Tom Bishop, Wenlin Institute <tangmu_at_wenlin.com>
Date: Wed, 24 Jul 2013 07:49:43 -0400

On Jul 24, 2013, at 3:32 AM, Mohammad Alam <malam1984_at_gmail.com> wrote:

> Hi All,
>
> I am using windows and C++ in development and using libcurl to upload a file on FTP it works fine if file name contains only ASCII characters but failed when its contains unicode characters like Άλφα_alam.pdf
>
>
> see below link
> http://curl.haxx.se/mail/lib-2006-04/att-0064/sampleconv
>
> Above example claims to addressed unicode issue but when I tried to use sample code then getting compilation errors for following functions
> platform_a2e
> platform_e2a
> platform_u2e
>
> Let me know where I could found the definitions of above function.?

It says,

   The "platform_xxx" calls represent platform-specific conversion routines.

I think that means you would use routines that are specific to your operating system, not supplied by libcurl.

Anyway, you don't need EBCDIC conversion. Windows normally stores file names as UTF-16. Conversion between UTF-16 and UTF-8 can be done using functions in the Windows API.

Unfortunately I don't actually know what you need to do; maybe change this

#define CURL_ICONV_CODESET_OF_NETWORK "ISO8859-1"

to

#define CURL_ICONV_CODESET_OF_NETWORK "UTF-8"

(I'm only guessing, based on <http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTCONVFROMUTF8FUNCTION>)

but I hope someone who actually knows will give you a better answer.

Best wishes,

Tom

文林 Wenlin Institute, Inc. Software for Learning Chinese
E-mail: wenlin@wenlin.com Web: http://www.wenlin.com
Telephone: 1-877-4-WENLIN (1-877-493-6546)

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-07-24