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
y field name for the htmlText version of selecting a word. But you probably have noticed that already. Kind regards Bernd -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/the-mouseText-and-Unicode-a-3-char-puzzle-tp3613315p3615459.html Sent from the Revolution -

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

2011-06-21 Thread BNig
- I added 3 bullets ••• to prevent the automatic conversion to the html characters, I am posting via Nabble. You'd have to remove the ••• and please watch out for linebreaks. I am shure there are more gotchas and it is not getting nicer this way but it is a poor man's unicode :) Kin

the mouseText and Unicode: a 3-char puzzle

2011-06-21 Thread Slava Paperno
ached 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 m

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

2011-06-21 Thread BNig
.278305.n4.nabble.com/the-mouseText-and-Unicode-a-3-char-puzzle-tp3613315p3613627.html Sent from the Revolution - User mailing list archive at Nabble.com. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe

the mouseText and Unicode: a 3-char puzzle

2011-06-20 Thread Slava Paperno
asleep trying. Thanks, Tariel, and thank you all for reading this, Slava > -Original Message- > From: Tariel Gogoberidze [mailto:tar...@me.com] > Sent: Monday, June 20, 2011 11:58 AM > To: sl...@lexiconbridge.com > Subject: Re: the mouseText and Unicode: CONCLUSION > >

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

the mouseText and Unicode: CONCLUSION

2011-06-19 Thread Slava Paperno
...@lists.runrev.com] On Behalf Of BNig > Sent: Sunday, June 19, 2011 5:45 AM > To: use-revolut...@lists.runrev.com > Subject: Re: the mouseText and Unicode: CONCLUSION > > Hi Slava, > > Congratulations. > > It works very nicely and fast. If you add a lock screen/unloc

Re: the mouseText and Unicode: CONCLUSION

2011-06-19 Thread BNig
ext into the field. Mark did not elaborate on that. Kind regards Бернд (thanks to google) I don't speak many languages but can make-up the noise of many, does that count as multlingual? :) -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/the-mouseTex

the mouseText and Unicode: CONCLUSION

2011-06-18 Thread Slava Paperno
Thanks to everyone who posted all the fun stuff in this thread today. The workaround below combines ideas from all of you. I learned two essential things from you guys: 1) mouseChunk, mouseText, mouseCharChunk, and a couple of related functions return the positions of bytes, not characters. In

the mouseText and Unicode: the Russian letter R

2011-06-18 Thread Slava Paperno
com [mailto:use-livecode- > boun...@lists.runrev.com] On Behalf Of BNig > Sent: Saturday, June 18, 2011 6:12 PM > To: use-revolut...@lists.runrev.com > Subject: Re: the mouseText and Unicode: the Russian letter R > > Slava, > > although Роберт is a nice guy he must give in: > >

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
uglier..." Kind regards Bernd -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/the-mouseText-and-Unicode-tp3607206p3608391.html Sent from the Revolution - User mailing list archive at Nabble.com. ___ use-livecod

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 __

the mouseText and Unicode: the Russian letter R

2011-06-18 Thread Slava Paperno
] On Behalf Of BNig > Sent: Saturday, June 18, 2011 1:10 PM > To: use-revolut...@lists.runrev.com > Subject: RE: the mouseText and Unicode > > Slava, > > Роберт gave up: > --- > on mouseUp >get word 4 of the clickCharChunk >put the

RE: the mouseText and Unicode

2011-06-18 Thread BNig
tWordClicked end mouseUp -- Kind regards Bernd -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/the-mouseText-and-Unicode-tp3607206p3608216.html Sent from the Revolution - User mailing list archive at Nabble.com

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
htmlText of field 2 to tWordClicked end mouseUp -- note: get word 4 of the clickcharChunk without selecting the word it did not work this works but don't ask me why Kind regards Bernd -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/the-mous

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
easy to parse out the comma. maybe this is a lead to your problem? Or I am way off, don't know anything about unicode. Kind regards Bernd -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/the-mouseText-and-Unicode-tp3607206p3607973.html Sent from the Revol

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

the mouseText and Unicode

2011-06-17 Thread Slava Paperno
ecode- > boun...@lists.runrev.com] On Behalf Of J. Landman Gay > Sent: Saturday, June 18, 2011 12:34 AM > To: How to use LiveCode > Subject: Re: the mouseText and Unicode > > On 6/17/11 11:07 PM, Slava Paperno wrote: > > > Is there an equivalent to the mouseText, or the mous

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

the mouseText and Unicode

2011-06-17 Thread Slava Paperno
Hi, List! It's me again with my Unicode problems in bilingual fields. I just spent four hours on this problem and gave up. I'm trying to retrieve the text of the word the user clicked on in a locked field. As far as I can tell, the MouseChunk and the mouseText are useless with Unicode, and especia