I wrote apple script that writes some text to a file in unicode format.
I know that by default it is in UTF-16 big endian format. But how to confirm that I am writing in Little Endian only.
My script is as following:
set the_file to (((path to desktop) as string) & "temp.txt") as file specification
open for access the_file with write permission --Open the file for writing and move to end of fle
set eof of the_file to 0
write ((ASCII character 254) & (ASCII character 255)) to the_file --> not as Unicode text
.
.
.
.
--set writeRecord with some data
write writeRecord to the_file starting at eof as Unicode text
write ((ASCII character 13) & (ASCII character 10)) to the_file as Unicode text
close access the_file
By default "temp.txt" file will be in Big endian UTF-16 format. I want it to be in Little endian UTF-16 format.
How can I achieve this task with apple script
Thanks & Regards,
Satyam.
|