Re: Bad Characters
Re: Bad Characters
- Subject: Re: Bad Characters
- From: Luther Fuller <email@hidden>
- Date: Thu, 16 Oct 2008 08:07:39 -0500
In my original script, I commented: "-- or use nullChar = "".
To emphasize that this is a bug, run this script ...
repeat with charNr from 125 to 165
set testChar to character id charNr
-- class of testChar is text and length of testChar is 1
if testChar = "" then
"empty"
else
"[" & testChar & "]"
end if
display dialog ((charNr as text) & " = " & the result) buttons
{"Cancel", "Next"} default button 2
end repeat
'testChar' can never equal the empty string, since it has length = 1 >
0, but
You will find that with some characters, testChar = "" is true.
An empty string with length 1 cannot exist.
Until this bug is fixed, you will have to test for an empty string with
if (length of string) = 0 then
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden