the mouseText and Unicode
richmondmathewson at gmail.com
Sat Jun 18 04:16:31 CDT 2011
On 06/18/2011 09:07 AM, Slava Paperno wrote:
> Aha! The idea of using "the number of words" is brilliant.
> Unfortunately, the word boundaries don't "quite" work, and I think it's for
> the same reason: I think the mouseCharChunk reports bytes, not characters.
> It is Unicode-smart in some ways: when you click a non-Roman letter, it
> returns "char N to N+1 of field X." When you click a Roman letter in a
> double-byte field it returns "char N to N of field X."
I think you may be right about double-byte stuff; or that Livecode looks
for things encoded in the ASCII set, and treats everything "else" as space.
However (not having any Russian I have used Bulgarian) I set up a stack
just now with
2 flds: "fSTART" and "fEND" and typed 'Всичко е глупости или лайно.'
into fld "fSTART"
I then typed this into a button:
set the useUnicode to true
set the unicodeText of fld "fEND" to the unicodeText of word 3 of fld
and ended up with 'глупости' in fld "fEND".
Try it . . . :)
More information about the use-livecode