I'm using vbscript via HP-UFT (former QTP). I'm facing with issue which looks pretty simple but I couldn't fix it.
I have .CSV files exported from some system and there is no finished CRLF in this file.
I need a simple fix to append new line to this file (I know that is possible write-to-another-file workaround) I'm using FileSystemObject like this:
Set objFile = objFSO.OpenTextFile(outFile,8)' (outFile,8, true/false/default)
objFile.Write "test string" & vbCrLf ' and other different combinations
I didn't use ADODB.Stream because it has not append function and I have no need to additional files
When I'm opening file in Notepad after my tries I see empty squares instead CRLF. I think it because file created with UCS-2 Little Endian encoding. I have no such issue with utf-8
PS maybe some more quick fix of system variable is possible? I have found in network that it possible to change default encoding for all created files via some system varibale but din't find it name. My Language in Region and Language -> Administrative -> Language for non-Unicode is English