binary scan: "character string"? 
Author Message
 binary scan: "character string"?

I'm curious to know what the definition of 'character string' is in
the [binary scan] manpage? Specifically, if I give a count, will it
potentially treat the data as two-byte unicode characters or does the
count equal the number of bytes? In my own small test it did what
I wanted (equal to number of bytes), but with the data at hand that
could be a coincidence.

The reason I'm asking is because there does not seem to be any other
way of reading N bytes into a variable without altering the data in the
process. The obvious choice would be the 'c' scan option, but if I do "c5" I
get 5 bytes split into a list, which I cannot then reprocess with another
later [binary scan]. For that I just want N bytes, no splitting.

--
                              / http://www.*-*-*.com/ ~setok/



Sat, 15 Oct 2005 23:58:14 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. scan string for "returns"

2. Checking strings for "bad" characters

3. reading strings with embedded "/" characters

4. Integer to "binary string"?

5. "string map" with binary data

6. string.join(["Tk 4.2p2", "Python 1.4", "Win32", "free"], "for")

7. '"""' and linefeed characters

8. string match fails for strings containing "["

9. clock scan "this" modifier

10. scan for "words" in Reference Manual

11. Characters "?", "?", "ΓΌ" shown in wrong font

12. incorrect return value for "scan" command

 

 
Powered by phpBB® Forum Software