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.
Changing FullFilename to widestring and createfile to createfileW like so:
aHandle := CreateFileW(PWideChar(FullFileName),dwDesiredAccess, dwShareMode, nil, dwCreationDisposition, dwFlagsAndAttributes, 0)