Writeing text to file in UTF-16 little endian
Writeing text to file in UTF-16 little endian
- Subject: Writeing text to file in UTF-16 little endian
- From: "Sutapalli Satyanarayana" <email@hidden>
- Date: Mon, 20 Apr 2009 00:18:51 -0600
I wrote apple script that writes some text to a file in unicode format.
I know that by default it is in UTF-16 format. But how to confirm that I am writing in Little Endian only and how to check the output file whether it is in little endian or not.
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.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden