Re: Jaguar, AS 1.9. Coercing alias to string still returns styled text
Re: Jaguar, AS 1.9. Coercing alias to string still returns styled text
- Subject: Re: Jaguar, AS 1.9. Coercing alias to string still returns styled text
- From: "Neal A. Crocker" <email@hidden>
- Date: Mon, 26 Aug 2002 09:59:58 -0700
Date: Sun, 25 Aug 2002 12:08:12 -0700
Subject: Re: Jaguar, AS 1.9. Coercing alias to string still returns
styled text
Cc: AppleScript Users <email@hidden>
To: Cornwall <email@hidden>
From: Christopher Nebel <email@hidden>
On Sunday, August 25, 2002, at 01:34 AM, Cornwall wrote:
> alias "path:for:something" as string
>
> Yields a string of styled text.
Yep. This isn't new; I think it's been this way since AppleScript 1.7.
The trick is that (a) path strings are now returned as Unicode text,
and (b) "as string" isn't clever enough to suppress the style
information if it's merely the system default style. (You could argue
that doing so would be wrong, however -- see below.)
> Is the only way to get plain text still to use that weird "class
> <<kext>>"
This may not be relavant to your question, but here it is anyway.
The AS 1.9 release notes
(
http://developer.apple.com/techpubs/macosx/ReleaseNotes/AppleScript.html)
contain the following snippet:
"AppleScript automatically converts any result value that is is
returned as Unicode text in UTF-8 format into Unicode text. To
convert a string value to the UTF-8 format, use the coercion as
Gclass utf8H [2936516]"
I'm not certatin, but I believe UTF-8 is plain text. By the way, I'm
guessing "Gclass utf8H" means "<<class utf8>>".
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.