JB,

Well it gives some peculiar results because I clearly don't know much about the encoding process in terms of passing the right params.

I rewrote this to be more general. Give it a try if you like and let me know. It will handle carriage returns and such properly.

Seems speedy enough for me but again, I am sure it can be improved upon.

Thanks for your help, most generous of you.


----------------------

function convertTextToBinary varText
   repeat with n = 1 to the number of chars of varText
      put chartonum(char n of varText) into theNum
      put baseConvert(theNum,10,2) into tBaseConverted
      if length(tBaseConverted) <8 then
         repeat until length(tBaseConverted)= 8
            put "0" before tBaseConverted
         end repeat
      end if
      put tBaseConverted after tConverted
   end repeat
   return tConverted
end convertTextToBinary


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

Reply via email to