Jump to content

_FTP_FilePut and Unicode file names


Recommended Posts

I'm having trouble using Chinese Unicode file names with _FTP_FilePut().

I can read the file names correctly with FileFindNextFile(), but they are munged on the remote machine when sent via _FTP_FilePut().

I tried converting the file names to UTF-8 using _WinAPI_WideCharToMultiByte(), but that didn't help either.

I can transfer the file names correctly using FileZilla if I force it to use UTF-8.

Has anyone had any success using Unicode file names with _FTP_FilePut()?

Link to comment
Share on other sites

I tried modifying _FTP_FilePut() to send a UTF-8 string via FtpPutFileA() and to send wide strings via FtpPutFileEx(), to no avail.

I'm beginning to suspect that DllCall() doesn't pass wide strings correctly.

Has anyone successfully passed wide strings to DllCall()?

Edited by Synchro
Link to comment
Share on other sites

DLLCall has no bug with wstr. The problem should be FTPPutFile. I think, it converts the unicode to ascii before sending the string to the server. You should try to use FtpOpenFileA with an UTF-8 encoded string and InternetWriteFile. You could modify the _FTP_ProgressUpload for that.

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...