Re: Can anyone explain this?
Re: Can anyone explain this?
- Subject: Re: Can anyone explain this?
- From: has <email@hidden>
- Date: Sat, 28 Dec 2002 00:31:51 +0000
Michelle Steiner wrote:
set foo to (choose file)
tell application "Finder" to set foo_name to name of foo
--> "Advance and Retreat"
text items of foo_name
--> {"", "", "d", "v", "a", "n", "c", "e", " ", "a", "n", "d", " ",
"R", "e", "t", "r", "e", "a", "t"}
The first text item is replaced by two null characters.
Actually by two empty unicode strings. ('null character' = ASCII 0)
set s to "text"
set ut to "text" as Unicode text
set text item delimiters to ""
log s's characters
--> {"t", "e", "x", "t"}
log s's text items
--> {"t", "e", "x", "t"}
log ut's characters
--> {"t", "e", "x", "t"}
log ut's text items
--> {"", "", "e", "x", "t"}
Looks like a bug in Unicode text and/or text item delimiters
(OS10.2.3, AS1.9.1). Suggest making a report
<
https://bugreport.apple.com/> and sticking to 'characters of ...'
(what you should use anyway).
has
--
http://www.barple.pwp.blueyonder.co.uk -- The Little Page of AppleScripts
_______________________________________________
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.