Hello!
To my knowledge, the format of a file written to by a trigger is UTF-16 LE (provided that the file did not exist prior to the trigger trying to write into it). If the file had already existed before you wrote to it with a trigger, check what program created it and what encoding it chose.