Bad Character
Bad Character
- Subject: Bad Character
- From: Luther Fuller <email@hidden>
- Date: Thu, 27 Sep 2007 16:28:13 -0500
Yesterday, a message from Shane Stanley (Sep 26, 2007 5:22:17 PM CDT)
addressed to applescript-users appeared in my mail. When I tried to
save it with Mail Saver, something broke. I finally traced the
problem to character 57 in the subject line of this message.
(Subject: "Re: Setting Pages Insertion point (was Setting TextEdit
Š )") Character 57 is the "Š".
I was thinking I would find the problem and quickly fix my script.
This was not to be.
(Many thanks, Shane. This is how bugs are revealed!)
There seems to be a very bad bug in the way AppleScript handles this
character.
my script contains the line ...
set subText to (subject of msg) as text
so, 'subText' should be ascii text. And it seems to act like ascii
text except for character 57.
In various displays of 'subText', this character appears as "?" or
"lower case a umlaut" or "upper case a umlaut" or as a null. Mail's
subject header does not display this character, but, as you can see,
when pasted into the body of this massage, it becomes "Š".
When I try to do ...
repeat until (offset of (space & space) in subjectText) = 0
character 57 acts, incorrectly, like a space character, causing a
stuck loop.
Character 57 identifies itself as ascii number = 63 (the "?"
character). My attempts to remove ascii character 63 don't seem to
work, however. And legitimate "?" characters would be removed too
which I don't want.
I smell a big bad bug here. Does anyone know more?
_______________________________________________
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