MACSCRPT Archives

April 2008

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Emmanuel <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Tue, 29 Apr 2008 21:47:09 +0200
Content-Type:
text/plain
Parts/Attachments:
text/plain (23 lines)
At 1:41 PM -0500 4/29/08, Steve Alex wrote:
>Almost seems some setting on his machine in making at act like 
>UTS-16. Text Wrangler/BBedit reports it as US Roman/Mac.
>
>Any ideas? Did not check archives since I can't seem to find them.

No mystery here. If you feed "write" with Unicode text (which is very 
likely to happen on modern systems), it will by default write UTF-16. 
If you don't want that, write:

write theStuff to theFile as «class utf8»

or

write theStuff to theFile as string

The default behavior is like if you wrote:

write theStuff to theFile as Unicode text ("Unicode text" is 
AppleScript's nickname for UTF-16).

Emmanuel

ATOM RSS1 RSS2