Idftp.Put utf8 problem

Giganews Newsgroups
Subject: Idftp.Put utf8 problem
Posted by:  explorer (explorer.…@Gmail.com)
Date: Tue, 02 Jun 2009

I'm using Delphi7 + Indy10.5.5 + FileZillaSvr + WinXPChinese

My code snippet is:

var
  LocalFile,
  FTPFileName: String;
....
  F_Indy.Put(LocalFile, FTPFileName);

Here if FTPFileName is Englishname, it's OK. if FTPFileName contains
chinese name, eg: "新建 Microsoft Visio 绘图.vsd", the file uploaded on
  the server becomes "D??¨ Microsoft Visio ??í?.vsd".

I saw IssueFEAT in TIdftp.pas, and it will SendCmd('OPTS UTF8 ON'), and
FileZilla returns 200. So I guess it's because INDY assumes the
DestFilename as UTF8 format, but acctually the DestFilename is Ansistring.

How can I fix this?  Thank you!

sorry for my English

Replies