Synchro Posted April 22, 2010 Share Posted April 22, 2010 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 More sharing options...
Synchro Posted April 23, 2010 Author Share Posted April 23, 2010 (edited) 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 April 23, 2010 by Synchro Link to comment Share on other sites More sharing options...
ProgAndy Posted April 23, 2010 Share Posted April 23, 2010 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 More sharing options...
Synchro Posted April 30, 2010 Author Share Posted April 30, 2010 It looks like updating to v3.3.6.1 fixed the problem. I can now send Chinese file names via _FTP_FilePut() if I convert them to UTF-8 using _WinAPI_WideCharToMultiByte(). maniootek 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now