Re: display dialog bug
Re: display dialog bug
- Subject: Re: display dialog bug
- From: Christopher Nebel <email@hidden>
- Date: Mon, 20 Jun 2005 15:54:34 -0700
On Jun 18, 2005, at 3:50 PM, Paul Berkowitz wrote:
There's a quirk with 'display dialog' in Tiger that has had enormous
consequences for many of my shareware script users...
What you describe has very little to do with "display dialog", and
mostly to do with how you're reading and writing to that preferences
file of yours. "read" and "write" are not at all smart about the
encoding they use. If you want your old behavior back (which,
incidentally, will not be Unicode-safe), then add an explicit "as
text" to all the relevant "read" and "write" commands. Do not
attempt to patch up the strings afterward by deleting all the nulls
-- it's hard, and won't work with non-ASCII characters anyway. (Yes,
I mean non-*ASCII*, not "non-MacRoman.")
If you want to be Unicode-safe about your data, use "as Unicode text"
instead of "as text", though of course that will not work for
existing data files. I'd recommend using the plist APIs to store all
your information, but that's not practical from pure AppleScript yet.
--Chris Nebel
AppleScript and Automator Engineering
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden