Re: when words aren't words
Re: when words aren't words
- Subject: Re: when words aren't words
- From: Bill Briggs <email@hidden>
- Date: Mon, 14 Nov 2005 17:49:14 -0400
At 1:19 PM -0800 11/14/05, Christopher Nebel wrote:
>On Nov 14, 2005, at 11:30 AM, Emmanuel wrote:
>
>>At 1:41 PM -0500 11/14/05, David Hanauer wrote:
>>
>>>Overall, my experience is that AppleScript does a very good job at defining a word, but it will likely be important for you to test the nuances of your own application/script.
>>
>>AppleScript's definition of words depends on the localization, I think.
>
>The proper term is not "localization", but "locale" -- in UI terms, what you've set the Word Break popup to in the International preference pane -- but otherwise correct. AppleScript's "word" is a natural-language word (or at least as best the Internationalization algorithms can guess), which is not even remotely the same thing as a series of non-whitespace characters. If you want the latter, use "text item delimiters", regular expressions, or some other solution, but not "words".
I would have loved to use text item delimiters, but TextEdit doesn't have it's own text item delimiters, and to preserve style information in the text of the document it would be a LOT easier to work with it in situ.
It would be nice if TextEdit, like Scriptable Text Editor from days of yore, had and used its own text item delimiters. Not having it makes otherwise simple operations rather tedious to perform, particularly when style information needs to be preserved.
- web
_______________________________________________
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