AppleScript doesn't support arbitrary transcoding. It understands
your local Mac* character set ("string") and Unicode ("unicode text");
If you want to get Latin-1 text into a file, there are no doubt FBA's
and/or OSAXen that will do it, but I'll leave those recommendations to
others more knowledgeable than I.
I know you can also do it by scripting BBEdit, but I'm not at my Mac
right now so I can't work out the details for you.
Last but not least is the shell option. Having written the file out
as Unicode, you can convert it to Latin-1 with iconv:
do shell script "iconv -f utf-16 -t iso-8859-1 " & (posix path of
temporary_file_location) & ">" & (posix path of final_file_location)
Mark J. Reed <email@hidden>
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription: