Unicode issue with uploding a file to Sbridge SFTP Server

Discussion of open issues, suggestions and bugs regarding network security and data protection solution - SecureBridge
Post Reply
tcaduto12068
Posts: 132
Joined: Wed 17 Aug 2016 05:57

Unicode issue with uploding a file to Sbridge SFTP Server

Post by tcaduto12068 » Wed 08 Jul 2020 01:14

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

tcaduto12068
Posts: 132
Joined: Wed 17 Aug 2016 05:57

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

Post by tcaduto12068 » Tue 28 Jul 2020 14:36

Anyone at devart take a look at this yet?
I put the fix I came up with and it has been working fine.

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

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

Post by ViktorV » Wed 29 Jul 2020 02:54

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.

Post Reply