Re: Unicode Bad Characters
Re: Unicode Bad Characters
- Subject: Re: Unicode Bad Characters
- From: Luther Fuller <email@hidden>
- Date: Wed, 6 Aug 2008 16:18:41 -0500
Perhaps a very few of the gory details are in order ...
Late last year, I identified Unicode characters in the range [131 -
159] ([0083 - 009D] hex) as problem characters.
The problem was that the code below choked on text containing pairs of
those characters, or one of these characters next to a space character.
repeat until (offset of (space & space) in subjectText) = 0
set AppleScript's text item delimiters to {space & space}
set wordList to (text items of subjectText) as list
set AppleScript's text item delimiters to {space}
set subjectText to wordList as text
end repeat -- multiple spaces replaced with single space
The offset command would find 'pairs of spaces' that text item
delimiters could not see, resulting in an unending loop. Testing of
this code was done in 10.4.10 and later, I think, in 10.4.11.
I've just tested this code in 10.5.4, and the offset command correctly
identifies pairs of spaces. (I'll have to test this later in 10.4.11)
Something was fixed in 10.5 and perhaps in 10.4.11.
I'm wondering if anyone knows if this fix is documented anywhere?
_______________________________________________
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