Page 1 of 1

Unicode issue with uploding a file to Sbridge SFTP Server

Posted: Wed 08 Jul 2020 01:14
by tcaduto12068
Hi,
NOTE: I am not on the version that was released in July 2020, but rather the version before the current one.
I had a user upload a file that had a unicode dash or apostrophe in it and when the
TScSFTPServer.DefaultOpenFile created the file it would garble it like this:

here is an example filename with the unicode apostrophe:
TCS-CDEC.Invesco’s STIT Purchase Request.pdf


aHandle := CreateFile(PChar(FullFileName),dwDesiredAccess, dwShareMode, nil, dwCreationDisposition, dwFlagsAndAttributes, 0)

with this line the file is garbled when it’s saved to disk.

Image

Changing FullFilename to widestring and createfile to createfileW like so:

aHandle := CreateFileW(PWideChar(FullFileName),dwDesiredAccess, dwShareMode, nil, dwCreationDisposition, dwFlagsAndAttributes, 0)

Image

Re: Unicode issue with uploding a file to Sbridge SFTP Server

Posted: Tue 28 Jul 2020 14:36
by tcaduto12068
Anyone at devart take a look at this yet?
I put the fix I came up with and it has been working fine.

Re: Unicode issue with uploding a file to Sbridge SFTP Server

Posted: Wed 29 Jul 2020 02:54
by ViktorV
Sorry for the delay on this.
Thank you for interest to our product and contributing to our product development.
We have answered you via e-mail.