Page 1 of 1

Modifying Chars in a String As If They Were Bytes

Posted: Mon Jul 05, 2010 9:29 pm
by lbiswim
How would I go about modifying chars in a string as if they were bytes?
I need to read data from a file then modify it byte by byte but nothing I have tried has worked. I tried using ord chr and strlen
but the output seems to be rounded to conform to some crazy standards where the range isn't 0-255

Thanks
John

Re: Modifying Chars in a String As If They Were Bytes

Posted: Mon Jul 05, 2010 10:15 pm
by Jonah Bron
Chr() and ord() should work properly. Can you post the code you tried, or at least a little demo script that you don't think works?