On 1/30/2015 6:50 AM, David Epstein wrote:
But since it seems that fonts and systems will differ as to which
characters are actually invisible, I will need to purge even harmless
visible characters. So my current plan is to use this function:
function scrubbedText txt
-- For tab-delimited data, replace possibly invisible characters with a space;
and then
-- remove leading and trailing spaces from each cell
repeat for each char k in txt
if charToNum(k) > 31 or charToNum(k) < 127 then put k after hold
else put space after hold
end repeat
You could probably use "filter txt with regex pattern", if you can come
up with the right regular expression. One of our smart regex people
probably knows what that is.
If you do end up using the function above, I think you'll want to use
"and" instead of "or" in the "if" statement. As written it will match
all possible characters.
--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
_______________________________________________
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