Bariqah Posted March 15, 2018 Share Posted March 15, 2018 Hi all, I am using AutoIt Script to upload files on DropBox .. $oHTTP.SetRequestHeader("Dropbox-API-Arg", '{"path":"/' $sFilename & $sExtension & '","mode": "add"}') It works well. But when the $sFilename is non-English, then it fails to upload.. I think I have to encode it somehow.. I have no clue.. Will appreciate your help Link to comment Share on other sites More sharing options...
Bariqah Posted March 15, 2018 Author Share Posted March 15, 2018 6 hours ago, Bariqah said: Hi all, I am using AutoIt Script to upload files on DropBox .. $oHTTP.SetRequestHeader("Dropbox-API-Arg", '{"path":"/' $sFilename & $sExtension & '","mode": "add"}') It works well. But when the $sFilename is non-English, then it fails to upload.. I think I have to encode it somehow.. I have no clue.. Will appreciate your help Solved it! Func EncodeString($s) $result = '' For $i = 1 To StringLen($s) $char = StringMid($s, $i, 1) If StringIsASCII($char) Then $result &= $char Else $result &= '\u' & Hex(AscW($char), 4) EndIf Next Return $result EndFunc Earthshine 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