MACSCRPT Archives

August 2007

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:
David Livesay <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Thu, 16 Aug 2007 07:40:13 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (8 lines)
I opened some logs written by one of my scripts and found it was all full of s?t?u?f?f? ?l?i?k?e? ?t?h?i?s?.?

Turns out the files are all UTF-16. I generally use UTF-8 for everything, and I see no real reason for writing plain old log files in UTF-16. Mac OS Roman would be perfectly adequate, and somehow seems more like what you'd expect to get from AppleScript.

I can't find anything in the Language Guide that suggests you can specify which text encoding to use. All it really says on the subject is that "AppleScript provides partial support for...Unicode Text," which they seem to equate with UTF-16. (Both UTF-8 and UTF-16 are Unicode.) In light of that, it seems odd that they would make UTF-16 the default encoding when they say they only provide "partial support," whatever that means, for it.

Does anybody know if it's possible to set the default text encoding, sort of like the way you can set the default text item delimiters?

ATOM RSS1 RSS2