Does this look safe for Windows and Mac funny characters? Those will always be > 126 ascii decimal correct?

function isPrint pChar
  set the useUnicode to false
  get charToNum(pChar)
  if (it < 32) or (it > 126) then return false
  return true
end isPrint

function printableCharString pString
 local tRes, c
 repeat for each character c in pString
   if isPrint(c) then put c after tRes
 end repeat
 return tRes
end printableCharString



Looks OK to me, Alex; but why not just use:


function printableCharString pString
 local tRes, c
 repeat for each character c in pString
   if c < space or c > "~" then next repeat
   put c after tRes
 end repeat
 return tRes
end printableCharString

--

Rob Cozens
CCW, Serendipity Software Company
http://www.oenolog.net/who.htm

"And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee."

from "The Triple Foole" by John Donne (1572-1631)
_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to