Unicode matchChunk (was multiple-word phrases, links)
Kjetil Rå Hauge
k.r.hauge at east.uio.no
Fri Sep 12 18:13:00 EDT 2003
At 13:59 +0200 12-09-03, Toma Tasovac wrote:
>I've looked a little more into this. The
>problem is not necessarily with the matchChunk
>function, but with uniencode. Namely, if the
>text is typed directly into the field, the
>matchChunk function will work. If, however, I
>use the uniencode function to put the same text
>file into the field, the matchChunk will fail.
>Anyway, it's in bugzilla now.
>
>Am Donnerstag, 11.09.03 um 19:54 Uhr schrieb Tuviah Snyder:
>
>>>Chris, your script works great with English, but I can't get it to work
>>>with Unicode text.
>>Maybe try UTF8ing the text first before sending to the matchChunk function.
>>
It may seem that matchChunk likes utf-16 better.
I was able to make the function work in both
fields in your test stack in Bugzilla by copying
the text from field importedText, pasting into
TextEdit, making sure it was in the Lucida Grande
font, saving in TextEdit as utf-16 text, and
reading in as binary:
answer file "Please choose a file:"
if it is not empty then put "binfile:"&it into myPath
set the unicodeText of field "importedtext" to URL myPath
(And if you fix the typo "vesteckt sein" in the
other field you will get a full set of matches in
both fields...)
--
--- Kjetil Rå Hauge, U. of Oslo. Tel. +47/22856710, fax +47/22854140
--- (this msg sent from home, +47/67148424, fax +1/5084372444)
More information about the use-livecode
mailing list