Re: Replace all "as string" with "as Unicode text"?
Re: Replace all "as string" with "as Unicode text"?
- Subject: Re: Replace all "as string" with "as Unicode text"?
- From: Shane Stanley <email@hidden>
- Date: Wed, 29 Jun 2005 14:46:50 +1000
- Thread-topic: Replace all "as string" with "as Unicode text"?
On 29/6/05 2:06 PM, "Emmett Gray" <email@hidden> wrote:
> I've caught the end of the "path to... as string" discussion. Can
> someone tell me if it would be a good idea to replace all occurrences
> of "as string" with "as Unicode text" in vanilla scripts for 10.3 or
> later, whether or not the coercion involves a path? I did this in a
> script and it still runs, but I wonder if I've done the right thing.
FWIW, it's this sort of question that I was trying to see addressed when I
suggested some kind of guide be put on the Apple Web site. Perhaps a tech
note would be in order.
To try to answer your question directly, assuming you are not using old
apps, the things that you'd need to watch for are the fact that text item
delimiters have silently become case-sensitive for Unicode text in Tiger (so
wrap the relevant sections in "considering case"/"end considering" to future
proof your code), and if you do any reading and writing directly to files,
you will want to either still use strings there or read/write as Unicode
text, and perhaps include a BOM if the files are to be read by other apps.
--
Shane Stanley <email@hidden>
_______________________________________________
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