Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: The .applescript file format
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The .applescript file format



On Feb 11, 2011, at 2:36 PM, Shane Stanley wrote:

> Is saving files as UTF8 fine for .applescript? Do they need a BOM? Or should
> they be MacRoman encoded if that's possible?


Chris Nebel answers:

> We've never bothered to specify a particular encoding for .applescript files; it's merely defined as "text", and it's up to the consumer to figure out the right encoding.  All the system components will recognize a UTF-16 BOM; osascript(1) and the underlying OSALoadFile API (but not AppleScript Editor) will recognize UTF-8; otherwise the file is presumed to be in the primary system encoding.
>
> --Chris N.


So, you should probably either use UTF-16 or UTF-8 with a BOM in both cases.

--
Chris Page

 The other, other AppleScript Chris

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-implementors mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >The .applescript file format (From: Shane Stanley <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.