I have a function for writing String to a text file. It works, but for some reason (encoding?) it adds some weird data to the beginning of the file.
Here is the relevant code:
var file:File = new File(OUTPUT_FILE_NAME);
var stream:FileStream = new FileStream();
stream.open(file, FileMode.WRITE);
stream.writeUTF("Hello World!");
stream.close();
When I open the file in Notepad++, it shows this:
What am I doing wrong?