Re: the mouseText and Unicode: a 3-char puzzle

2011-06-21 Thread Dave Cragg
On 21 Jun 2011, at 07:40, Slava Paperno wrote: > VAR UTF-8 > 194 > 171 > 226 > 128 > 148 > 194 > 187 > > The FIELD and the VAR UTF-16 reports are entirely predictable, but the VAR > UTF-8 list is puzzling to me. I expected six bytes, not seven. I didn't follow the earlier thread, so apologies i

RE: the mouseText and Unicode: a 3-char puzzle

2011-06-21 Thread Slava Paperno
1 5:39 PM > To: use-revolut...@lists.runrev.com > Subject: Re: the mouseText and Unicode: a 3-char puzzle > > Slava, > > it worked on a self assembled russian text including em-dash and > guillemets > but not on your text. > > This works on your text: > > -

Re: the mouseText and Unicode: a 3-char puzzle

2011-06-21 Thread BNig
Slava, I made a slider, make it rather wide and add a field where to put the htmlText into The slider has this code: --- on mouseDown set the endValue of me to the length of field "TextToClick" end mouseDown on scrollbarDrag tValue put round (tValue) into t

Re: the mouseText and Unicode: a 3-char puzzle

2011-06-21 Thread BNig
Slava, it worked on a self assembled russian text including em-dash and guillemets but not on your text. This works on your text: -- on mouseUp lock screen get word 4 of the clickCharChunk put it into tSelPos put 0 into tStartSel repea

Re: the mouseText and Unicode: a 3-char puzzle

2011-06-21 Thread BNig
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 -- View this message in context: http://runtime-revolution.27

Re: the mouseText and Unicode: CONCLUSION

2011-06-20 Thread Bob Sneidar
Sure, but then I would be multi-talented. :-) Bob On Jun 19, 2011, at 2:45 AM, BNig wrote: > I don't speak many languages but can make-up the noise of many, does that > count as multlingual? :) ___ use-livecode mailing list use-livecode@lists.runrev

Re: the mouseText and Unicode: CONCLUSION

2011-06-19 Thread Pierre Sahores
runrev.com [mailto:use-livecode- >> boun...@lists.runrev.com] On Behalf Of Pierre Sahores >> Sent: Sunday, June 19, 2011 11:08 AM >> To: How to use LiveCode >> Subject: Re: the mouseText and Unicode: CONCLUSION >> >> Thanks for your fantastic work, Slava ! >>

RE: the mouseText and Unicode: CONCLUSION

2011-06-19 Thread Slava Paperno
ience with DataGrids and Unicode, please share. Kindly, Slava > -Original Message- > From: use-livecode-boun...@lists.runrev.com [mailto:use-livecode- > boun...@lists.runrev.com] On Behalf Of Pierre Sahores > Sent: Sunday, June 19, 2011 11:08 AM > To: How to use LiveCode > Su

Re: the mouseText and Unicode: CONCLUSION

2011-06-19 Thread Pierre Sahores
Thanks for your fantastic work, Slava ! I had to hack the LC htmltext features to build recent web apps and it's yet sure that i will become able to replace all this stuff with your UNICODE way to go. In using your method, it become simple to store data in UTF8 format inside PostgreSQL and th

Re: the mouseText and Unicode: CONCLUSION

2011-06-19 Thread BNig
Hi Slava, Congratulations. It works very nicely and fast. If you add a lock screen/unlock screen you shave off a couple of milliseconds which would pay off hugely in the long run for the days you had to spend solving that... :) Of course I still don't understand unicode so the HTML version I tr

RE: the mouseText and Unicode: the Russian letter R

2011-06-18 Thread Slava Paperno
Amen! S. > -Original Message- > From: use-livecode-boun...@lists.runrev.com [mailto:use-livecode- > boun...@lists.runrev.com] On Behalf Of Malte Brill > Sent: Saturday, June 18, 2011 5:22 PM > To: use-livecode@lists.runrev.com > Subject: Re: the mouseText and Unicode:

Re: the mouseText and Unicode: the Russian letter R

2011-06-18 Thread BNig
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 tSe

Re: the mouseText and Unicode: the Russian letter R

2011-06-18 Thread Malte Brill
> Something is different about the Russian upper case R byteToNum(byte 1 of the russian letter R) is 32 which is (TADA) SPACE and thus a word delimiter. Did I mention I hate unicode and the way it currently (not) works? Cries bitter tears. Malte __

RE: the mouseText and Unicode

2011-06-18 Thread BNig
Slava, this also works - on mouseUp get word 4 of the clickCharChunk put the number of words in char 1 to it of me into tWordNum select word tWordNum of me put the unicodeText of the selectedtext into tWordClicked set the unicodeText of field 2 to tWor

Re: the mouseText and Unicode

2011-06-18 Thread J. Landman Gay
On 6/18/11 1:34 PM, J. Landman Gay wrote: Here is a shudderingly, terrifyingly ugly hack that seems to work, at least with the sample text you posted: Never mind, it's off by one. I didn't test each letter. :( -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Softwa

Re: the mouseText and Unicode

2011-06-18 Thread J. Landman Gay
On 6/18/11 7:32 AM, Slava Paperno wrote: You also said "if you're desperate, delete that extra null byte." That's intriguing. I don't care about PPC machines. But I can't find any null bytes in my fields. I expected a null byte to be added to each Roman character, e.g. 0x00AF. But when I use "pu

RE: the mouseText and Unicode

2011-06-18 Thread BNig
Slava, Роберт gave up: --- on mouseUp get word 4 of the clickCharChunk put the number of words in char 1 to it of me into tWordNum select word tWordNum of me put the htmlText of the selectedtext into tWordClicked put tWordClicked into field 3 set the htmlTe

RE: the mouseText and Unicode

2011-06-18 Thread Slava Paperno
e. Enjoy your weekend, Slava > -Original Message- > From: use-livecode-boun...@lists.runrev.com [mailto:use-livecode- > boun...@lists.runrev.com] On Behalf Of BNig > Sent: Saturday, June 18, 2011 11:53 AM > To: use-revolut...@lists.runrev.com > Subject: RE: the mouseText and Uni

RE: the mouseText and Unicode

2011-06-18 Thread BNig
Hi Slava, I tried your example of mixed unicode and ASCII words. Using the word technique and the html I did this: - on mouseUp get word 2 of the clickCharChunk put the number of words in char 1 to it of me into tWordNum put word 1 to (the number of words in

RE: the mouseText and Unicode

2011-06-18 Thread Slava Paperno
, so I must be missing something. Slava > -Original Message- > From: use-livecode-boun...@lists.runrev.com [mailto:use-livecode- > boun...@lists.runrev.com] On Behalf Of Mark Schonewille > Sent: Saturday, June 18, 2011 6:24 AM > To: How to use LiveCode > Subject: Re: the m

Re: the mouseText and Unicode

2011-06-18 Thread Mark Schonewille
Hi Richmond, The itemDel can be only one char/byte long. If the useUnicode is true, then numToChar(32) returns 2 bytes. Hence the error. The docs are correct. -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engineering Homepage: http://economy-x-talk.com Twitter: http:

Re: the mouseText and Unicode

2011-06-18 Thread Richmond Mathewson
Is there an equivalent to the mouseText, or the mouseChunk, or the mouseCharChunk that is Unicode-aware? Or some ingenious way to retrieve the word that the user clicked? doing THIS: on mouseDown set the useUnicode to true set the unicodeText of fld "fEND" to the unicodeText of the clickT

Re: the mouseText and Unicode

2011-06-18 Thread Mark Schonewille
Hi Slava, Instead of simply pasting the text into LiveCode, do the following: set the unicodeText of fld x to the clipboarddata["unicode"] Now you can do this: on mouseDown select the clickText set the unicodeText of fld 2 to the unicodeText of the selection end mouseDown or whatever you w

Re: the mouseText and Unicode

2011-06-18 Thread Mark Schonewille
Hi Jacque, That's wrong for unicode, because it will catch one NULL too many, either at the beginning or the end of the string, depending on whether it is small or big endian (which depends on the processor that LiveCode is running on). If you're really desperate, you might use this approach an

Re: the mouseText and Unicode

2011-06-18 Thread Richmond Mathewson
http://andregarzia.on-rev.com/richmond/BOX/Paperno.rev.zip ___ 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/us

Re: the mouseText and Unicode

2011-06-18 Thread Richmond Mathewson
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 yo

Re: the mouseText and Unicode

2011-06-17 Thread J. Landman Gay
On 6/17/11 11:07 PM, Slava Paperno wrote: Is there an equivalent to the mouseText, or the mouseChunk, or the mouseCharChunk that is Unicode-aware? Or some ingenious way to retrieve the word that the user clicked? Does the "word" delimiter work? If so, you could try this in the field: on mouse