Jump to content

Recommended Posts

Posted

Hello,

I use autoit to connect on my FTP server and to move file.

To do that I use _FTP_Open , _FTP_Connect ...

My problem is when I have a filename with an accent (éêèà) this filename on my server, the name are not good with autoit.

café.txt become café .txt in autoit

In Filezilla I've set the FTP client to use UTF8 for the filename and I don't have any problem, but I don't find the same function for the autoit FTP.

I also try this function to convert the filename but nothing change in the string

Func _UNICODE2ANSI($sString = "")
; Convert UTF8 to ANSI to insert into DB
; http://www.autoitscript.com/forum/index.php?showtopic=85496&view=findpost&p=614497
; ProgAndy
; Make ANSI-string representation out of UTF-8
Local Const $SF_ANSI = 1
Local Const $SF_UTF8 = 4
Return BinaryToString(StringToBinary($sString, $SF_UTF8), $SF_ANSI)
EndFunc ;==>_UNICODE2ANSI
Func _ANSI2UNICODE($sString = "")
; Extract ANSI and convert to UTF8 to display
; http://www.autoitscript.com/forum/index.php?showtopic=85496&view=findpost&p=614497
; ProgAndy
; convert ANSI-UTF8 representation to ANSI/Unicode
Local Const $SF_ANSI = 1
Local Const $SF_UTF8 = 4
Return BinaryToString(StringToBinary($sString, $SF_ANSI), $SF_UTF8)
EndFunc ;==>_ANSI2UNICODE

Can you help me ?

Thank you

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
  • Recently Browsing   0 members

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