On 2/11/00 3:18 PM, Mary Bull <[EMAIL PROTECTED]> wrote:
>Good day! I have quite a few user-searchable texts that contain
>non-English characters. Is there a convenient way to convince MC that
>when I type "debris" into the Find box, I want it to return an instance
>of "d�bris"? I have spoken with my collaborator, and we agree that we
>could anglicize all such occurrences (a lot of them, I might add);
>however, we'd really like to provide this type of search without users
>having to remember all the key commands to generate the characters.
>Thanks in advance!
>
>Mary Bull
>[EMAIL PROTECTED]
>
>This is the MetaCard mailing list.
>Archives: http://www.mail-archive.com/metacard%40lists.best.com/
>Info: http://www.xworlds.com/metacard/mailinglist.htm
>
If you are searching in a particular field, the matchChunk function would
do the trick. First you have to create a search string that will do what
you want. To do that, you could use replaceText:
replace "e" with "[e�]" in theSearchString --do this for each of the
special characters
--then wrap the search string:
put ".*(" & theSearchString & ").*" into theSearchString
--the parenthesis turn it into a substring match, and the .*'s make it
fit in anywhere
--Then use matchChunk to see whether you have a match:
put matchChunk(theSourceString,theSearchString,hitStart,hitEnd) into
foundIt
--then foundIt is true if we got a match, and if we got a match,
--hitStart and hitEnd are the char offsets of the match
gc
Geoff Canyon
[EMAIL PROTECTED]
Your child can learn to read using the classics of children's literature.
Check out C.D. Caterpillar: <http://www.inspiredlogic.com/cd/>
This is the MetaCard mailing list.
Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm