I was only using Wireshark and Drag & Drop (from the computer to the FTP
site, nothing to do with ICS at this point) to see if it shed any light on
what was being sent to the FTP server. When I view the file from the
equivalent of Windows Explorer after the Drag & Drop, the filename is
displayed correctly.

This tells me that somehow I can put a file (with a Russian filename) on to
the FTP server and have it display correctly.

So what I need to know is how do I do the same thing with ICS and PutAsync? 

I have a Unicode filename and can convert it to UTF-8 if required.

Sorry for any confusion.

Graham

-----Original Message-----
From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] On
Behalf Of Angus Robertson - Magenta Systems Ltd
Sent: 19 November 2012 10:27
To: twsocket@elists.org
Subject: Re: [twsocket] FTP Client - Unicode Filenames

> I have the FTP client doing putAsync and getAsync to a FTP server. 
> If the filename contains Unicode characters (e.g. Russian), the 
> putAsync results in a filename of ???? on the FTP site.

The standard FTP component only supports Unicode with Delphi 2009 and later,
or if you use the OverbyteIcsFtpCliW version from my web site with Delphi 7
and 2007.  

> If I drag & Drop the file there is no problem.
> this option is not supported using Drag & Drop)

No idea what drag and drop has to do with any of this, or why you contradict
yourself.  ICS components are non-visual and do not support drag and drop.  

> OPTS UTF-8 ON (not sure how to use this

Some FTP server support Unicode, many do not.  Some (FileZilla) default to
UTF8 ON (no hyphen), most need the OPTS command to be sent
specifically to change from 8-bit ASCII to Unicode.   There is discussion
about Unicode and different FTP servers at:  

http://www.magsys.co.uk/delphi/magxfer.asp

This (simplified) code comes from the TMagFtp high level FTP component on
that page that hides all this stuff from the developer:

if (ftpFeatUtf8 in FSupportedExtensions) then begin
   if (magftpNoUtf8 in fMagFtpOpts) then
   begin
       CodePage := CP_ACP;
       NewOpts := 'UTF8 OFF' ;
   end
   else
   begin
       CodePage := CP_UTF8 ;
       NewOpts := 'UTF8 ON' ;
   end;
   Opts ;
end ;

> Wireshark seems to report

The only use Wireshark has here is looking to see if the FTP component is
actually sending UTF8 charaters or 8-bit ASCII.  

Angus

--
To unsubscribe or change your settings for TWSocket mailing list please goto
http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to