• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Write Text file in Little Endian UTF-16 format
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Write Text file in Little Endian UTF-16 format


  • Subject: Write Text file in Little Endian UTF-16 format
  • From: Satyam Satyanarayana <email@hidden>
  • Date: Mon, 20 Apr 2009 10:59:39 +0530

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
References: 
 >Re: Photomerge (From: Stan Cleveland <email@hidden>)
 >Simply deleting a fil (From: Satyam Satyanarayana <email@hidden>)
 >Re: Simply deleting a fil (From: Yvan KOENIG <email@hidden>)
 >Re: Simply deleting a fil (From: Tim Mansour <email@hidden>)
 >Re: Simply deleting a fil (From: Michelle Steiner <email@hidden>)
 >Re: Simply deleting a fil (From: Luther Fuller <email@hidden>)
 >Re: Simply deleting a fil (From: Yvan KOENIG <email@hidden>)
 >Re: Simply deleting a fil (From: Luther Fuller <email@hidden>)

  • Prev by Date: Writeing text to file in UTF-16 little endian
  • Next by Date: Writeing text to file in UTF-16 little endian
  • Previous by thread: Re: Simply deleting a fil
  • Next by thread: Re: Simply deleting a fil
  • Index(es):
    • Date
    • Thread