Bernd,
Thanks for the good news, but it doesn't work for me. I must be doing something
wrong. I am using the Russian text from Gogol that Tariel found. It is in the
attached txt file, with the three problem chars. And I'm using the handler you
posted on 6/16. It is in the other attached file. Do these work for you? Mind
the field names, please.
Slava
> From: use-livecode-boun...@lists.runrev.com [mailto:use-livecode-
> boun...@lists.runrev.com] On Behalf Of BNig
> Sent: Tuesday, June 21, 2011 6:06 AM
> To: use-revolut...@lists.runrev.com
> Subject: Re: the mouseText and Unicode: a 3-char puzzle
>
> Slava,
>
> no contribution to the puzzle but maybe to more sleep: the HTMLText
> works for selecting «—» and copying it. And all words afterwards.
>
> No order in the chaotic universe, just managing it, word by word :)
>
> Kind regards
>
> Bernd
«Ðак бÑдеÑе, гоÑпода, еÑ
аÑÑ ÐºÐ¾ мне, Ñо
пÑÑмеÑ
онÑко беÑиÑе пÑÑÑ Ð¿Ð¾ ÑÑолбовой
доÑоге на ÐиканÑкÑ» â заманивал Ðиколай
ÐÐ¾Ð³Ð¾Ð»Ñ ÑвоиÑ
ÑиÑаÑелей в ÑоднÑе меÑÑа. ÐÑ
поеÑ
али â и Ñзнали, оÑкÑда ÑаÑÑÑÑ Ð½Ð¾Ð³Ð¸ Ñ
гоголевÑкиÑ
ÑÑÑалок.
Slava,
although РобеÑÑ is a nice guy he must give in:
I tried with
СаÑа, ÐаÑаÑа, ÐиÑÑ, РобеÑÑ, Robert, Jeffrey, and СонÑ
ÐеÑÑова, СССР, ССРРСС Слава
ÐапеÑно, ÐоÑа Ðаглай, ÐакÑ, ÐапеÑно
РобеÑÑ, СССР, ССРРСС
-------------------
on mouseUp
get word 4 of the clickCharChunk
put it into tSelPos
put 0 into tStartSel
repeat with i = tSelPos down to 1
put the htmlText of char i of field 1 into tHTML
if (tHTML contains "<p> <" or tHTML is "<p></p>" or tHTML contains
">,<") then
put i into tStartSel
exit repeat
end if
end repeat
put the number of chars of field 1 into tEndSel
repeat with i = tSelPos to the number of chars of field 1
put the htmlText of char i of field 1 into tHTML
put char i of tData into taChar
if (tHTML contains "<p> <" or tHTML is "<p></p>" or tHTML contains
">,<") then
put i into tEndSel
exit repeat
end if
end repeat
select char tStartSel + 1 to tEndSel -1 of me
put the htmlText of the selectedtext into tWordClicked
-- put tWordClicked into field 3
set the htmlText of field 2 to tWordClicked
end mouseUp
-------------------
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode