Cyrillic input: working with chunks of Russian
Slava Paperno
slava at lexiconbridge.com
Wed Jun 1 15:01:31 EDT 2011
Malte,
You said,
> I do not appear to be able to say set the UnicodeText of fld "test" to
line 2 to -1 of UTF16String.
This does work for me. I don't know what the etiquette is on this list
regarding attachments, so I uploaded my screen shot to
http://russian.cornell.edu/CyrillicChunks.png. It helps understand the
script because the button labels are used in the script. In the screen shot,
I have asked it to "show word 3 of line 2." Here is the script that does
this:
put the unicodeText of field "InputField" of this card into locOutput --the
top field in the screen shot
put uniDecode(locOutput, "UTF8") into locOutput
put the label of button "LinePos" into locLinePos --this is the "In Line"
dropdown menu
put the label of button "WordPos" of this card into locWordPos --this is the
"Show Word" dropdown menu
put word locWordPos of line locLinePos of locOutput into locOutput
set the unicodeText of field "ResultsField1" of this card to
uniEncode(locOutput, "UTF8") --this is the bottom field in the screen shot
I haven't yet worked with intercepting keystrokes, but I will attack that
tonight or tmorrow. It is one of the requirements for my application.
Slava
More information about the use-livecode
mailing list