In the praat preferences menu it is possible to change the encoding of files written by Praat by using
Praat > Preferences > Text writing preferences...
My question whether it is possible to do this from within the script to guarantee that the user is always saving files with the correct encoding;
In my case UTF-8 w/o BOM. The default is try ASCII then UTF-16 which inserts the two bytes (BOM style) in the header of the file.
Simply put
Text writing preferences: "UTF-8"
at the beginning of your script.