I have the following Visual Basic 6.0 function which writes an ANSI string to a new file over FTP. I would like it to write the file as UTF-16LE. Is there any good way to do tha
We need to see the declaration for apiInternetWriteFile. I'm pretty sure it's a Declare into an API call, maybe something in WinINet.dll. My guess is that you need to:
ByVal Long for the 2nd argument Contents = ChrW(&HFEFF&) & Contents. Or possibly FFEF, not sure of the endianness.StrPtr(contents) for the 2nd argumentLen(contents)*2 for the 3rd argument (length in bytes)That will pass a Unicode UTF-16 string as the contents argument