RE: bug in joining list items
RE: bug in joining list items
- Subject: RE: bug in joining list items
- From: "Scott Babcock" <email@hidden>
- Date: Tue, 8 Aug 2006 16:03:10 -0700
- Thread-topic: bug in joining list items
This has been a bug since at least Jaguar. Any list that contains an item that AppleScript can't coerce to the requested type, it stops and returns what it has up to that point. This is probably acceptable, although non-coercible characters get converted to question marks in other instances. The thing that isn't OK is that the item that trips up the coercion is already of the requested type. An easier reproduction of this issue is this:
set foo to {"This ", "is ", «data utxt0103» as Unicode text, " test"}
return foo as Unicode text
--> "This is "
Has anyone logged this issue with Apple?
-----Original Message-----
Date: Thu, 13 Jul 2006 19:38:57 +0200
From: Yvan KOENIG <email@hidden>
Subject: bug in joining list items
To: "AppleScript User's List" <email@hidden>
Message-ID: <email@hidden>
Content-Type: text/plain; charset="macintosh"
Le 13 juil. 2006, ˆ 17:50, Emmanuel a Žcrit :
> Hello,
>
> (Running 10.4.7 on a G4 PB)
>
> The coercion of a list to [Unicode] text is broken.
>
> For a simple test, rename a file with a high-ascii character in it (ž
> will do it), then run "(list folder f) as Unicode text" on the parent
> folder: OMM the list is truncated just before the high-ascii name.
>
> Emmanuel
Hello
I made a test (on a french system), here is the result:
set f to choose folder
(list folder f) as Unicode text
History:
tell current application
choose folder
alias "Documents 2:pour_DG:"
list folder alias "Documents 2:pour_DG:"
{".DS_Store", "Icon
", "pourDG_AW5 (eÿeùeú).cwk", "pourDG_AW5.cwk", "pourDG_AW6.cwk",
"pourDG_W98.doc"}
end tell
Result:
".DS_StoreIcon
"
Missed:
"pourDG_AW5 (eÿeùeú).cwk", "pourDG_AW5.cwk", "pourDG_AW6.cwk",
"pourDG_W98.doc"
Yvan KOENIG
_______________________________________________
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