I'm running into something odd. I have a script that processes a UTF-8 file hashing passwords within each line in the file and outputs the data to a separate file. The script was compiled in 2017 and I'm not sure which WinBatch version was used. This script creates an ANSI encoded file which the vendor is expecting. See the attached
OLD - Compiled in 2017.jpg image with how Notepad sees the file.
The old script uses these two FileOpen functions to read and write.
readfile = fileopen(sourcepath : inputfile, "read")
writefile = fileopen(sourcepath : outputfile, "write")
When I run the code below in 2022B Studio, I expect to get an ANSI encoded file since I'm not indicating a Unicode flag but it appears to be UTF-8. The output file from the code is attached as well as an image of how Notepad sees the file.
output = fileopen("C:\TempWork\Output_ANSI.txt","write")
filewrite(output, "Line1")
filewrite(output, "Line2")
filewrite(output, "Line3")
fileclose(output)
Am I doing something wrong, has something changed, is there a bug?
Thanks!!