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:
Walter Ian Kaye <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Thu, 16 Aug 2007 08:13:28 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (33 lines)
At 07:40 a -0700 08/16/2007, David Livesay didst inscribe upon an 
electronic papyrus:

>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?

I don't think so.

Is there anything in your script coercing to 'Unicode text'?

Have you tried simply coercing to 'string' or 'text' before logging?

If that doesn't work, there's always the TEC osax (does that work on Intel?).


-boo

ATOM RSS1 RSS2