Invisible character treated as word?

Ralph DiMola rdimola at evergreeninfo.net
Tue Jan 27 20:29:41 EST 2015


A non-breaking space(160) is respected in LC as a word delimiter. But the
202 is just another character. In the standard extended ascii table this is
a │ character In other character sets is might be displayed as a space or
just invisible. This would be part of the word it's adjacent to. GIGO. If
someone put a 202 in a number field or data file in my apps, then it's on
them. If you want just numbers then do a chartonum for each character and
make sure it's in range of chartonum("0") to chartonum("9") or a decimal
point it it's a real.

Ralph DiMola
IT Director
Evergreen Information Services
rdimola at evergreeninfo.net


-----Original Message-----
From: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] On Behalf
Of David Epstein
Sent: Tuesday, January 27, 2015 8:12 PM
To: use-livecode at lists.runrev.com
Subject: Invisible character treated as word?

For a tab-delimited table of numbers, I want to be sure that none of the
numbers is surrounded by invisible spaces that will interfere with using the
numbers in calculation.  I do that by overwriting each cell with "word 1 to
-1 of" that cell.
This generally works fine, but was tripped up by a case in which a number
was followed by what looked like two spaces.  Closer inspection revealed
that the second space had charToNum value 202.  Even though it is invisible,
LiveCode (5.5) seems to treat it as a word, and so my script did not strip
it out.
Are there other characters that are always or sometimes invisible that cause
the same problem?  And what is a remedy?
Many thanks.

David Epstein
_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list