in reply to Datatype and pack/unpack
"char" in the pack documentation refers to the type "char" of the C language. It may or may not be as ASCII character. The value may or may not be any kind of character. As far as pack/unpack is concerned, it's just an arbitrary 8-bit value. The value could represent the the number of employees in my company.
Note that unpack('c', "\x80") and unpack('C', "\x80") (for example) are legit, but neither produces a value that's could be an ASCII character. ASCII only has characters associated with numbers 0 to 127.
I'm curious as to why you would call them ASCII when you example never deals with the values as characters.
|
|---|