Yes. You can append a little “as Unicode text” (built-in class in AppleScript, which is UTF-16) to your read-write commands and you are done.
set f to (open for access file x) set eof of f to 0 --> empty file contents if needed write "foo" to f as Unicode text close access f
If you need this file into a text editor, we would recommend adding a little flag to the file (called BOM: Byte Order Mark), so the text editor recognizes this is a utf-16 encoded file:
set f to (open for access file x) set eof of f to 0 --> empty file contents if needed --> now write the flag write ((ASCII character 254) & (ASCII character 255)) to f --> not as Unicode text --> now write the data write "foo" to f as Unicode text close access f
We wrote 0xFE and 0xFF (in hex notation) as BOM, which is the rigth mark in Mac, while in a PC we would swap this as 0xFF and 0xFE (as well as all the other bytes).
Reading is very similar:
read file x as Unicode text