cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: UNICODE with libcurl on Win2K?

From: Gerard Cheng <cheng_at_vertigoxmedia.com>
Date: Fri, 16 May 2003 16:55:28 -0400

> It depends on how the format of the directory name as expected by
> the remote FTP server. Chances are, the server will expect a name
> in UTF-8 format in which case you need to convert your UTF-16 name
> as wchar_t to a UTF-8 name as char *. If the server expects
> something other than UTF-8, then you'll have to find out what it
> expects and convert to that instead. Windows has a WideCharToMultiByte
> call that can probably be used for the conversion, or there's the
> ANSI function wcstombs.

Thank you for the reply.

How can one detect which encoding the FTP server is expecting?
Can this be done dynamically or does it need to be configured
in advance?

Do FTP servers actually expect commands to be in the correct
encoding as well? That is, just say the FTP server expects
UTF-16, would the whole of the command:
        CWS PathWithNonISO8859Characters
need to be encoded in UTF-16 or just the path?

Would anyone know which encoding scheme the Win2K filesystem
uses to store filenames? Is that what affect which encoding to
send to the FTP server?

Thanks,

Gerard

-------------------------------------------------------
This SF.net email is sponsored by: If flattening out C++ or Java
code to make your application fit in a relational database is painful,
don't do it! Check out ObjectStore. Now part of Progress Software.
http://www.objectstore.net/sourceforge
Received on 2003-05-17