double byte chars
slava at lexiconbridge.com
Mon Jun 13 13:38:16 EDT 2011
Have you used
set caseSensitive to true?
If it doesn't do what you want, you can always compare the decimal character
code points, 1072 for the lower case a, 1040 for the upper case A etc.
I do use "select after" in my fields with Russian/English text to set the
insertion point and have not noticed it being slow, but I have not used it
in a repeat loop, so I don't know the answer to that question.
> -----Original Message-----
> From: use-livecode-bounces at lists.runrev.com [mailto:use-livecode-
> bounces at lists.runrev.com] On Behalf Of Lars Brehmer
> Sent: Monday, June 13, 2011 12:59 PM
> To: use-livecode at lists.runrev.com
> Subject: re: double byte chars
> Thanks to all who replied. I finally got it right using UTF8.
> Just one more question about this - does Rev unicode support not handle
> sensitivity? Or is there something I need to do? My scripts won't match a
> it is capitalized, but my no- unicode apps of course do.
> It's not a huge tragedy if caseSensitive = false doesn't work, but it
would be nice.
> While I was experimenting with workarounds I came upon something that I am
> very curious about. I was trying to handle this forward filter text
> first putting the text in question into invisible fields. The actual
script is matching
> texts stored in custom properties. I know using text is much slower but I
> something crazy slow. In a script of about 600 lines, this is the
> if item 16 in Q <> empty then
> repeat with g = 16 to 22 step 2
> put item g in Q into fld "expTemp"
> repeat with i = 1 to the num of words in fld "expTemp"
> if item 1 in Q is not in eOutput then
> put empty into fld "wordTemp"
> select word i in fld "expTemp"
> --select after text of fld "wordTemp"
> delete char 1 to 2 in fld "wordTemp"
> if char 1 to tNum in fld "wordTemp" = fld "search" then
> put item 1 in Q & tab & item g in Q & tab & g & cr after
> end if
> end if
> end repeat
> end repeat
> the inactive line --select after text of fld "wordTemp"-- causes glacial
> when it is active. When it is inactive, the entire script runs to the end
> 220 milliseconds, but of course doesn't deliver the desired result. This
> comparison to about 35 milliseconds using your unicode suggestions, which
> very pleased with. But if that line is active, I do get the desired
results, but it
> takes 34 SECONDS!
> So out of curiousity, how can inserting the cursor in an empty field add
> seconds to a simple script? The script is unusable of course, but for
> reference, just wondering.
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
More information about the Use-livecode