So I'm trying to pack a packet header, and things are working fine, except for header flags I need to pack as strings are only unpacking the first character of the string.
For instance,
string = "ahhhhhh"
buffer = pack("s", string.encode('UTF-8'))
list = unpack("s", buffer)
print(list)
gives me (b'a')
What am I doing wrong?
Ah, so for my format string, I have to specify the amount of characters in the string I'm packing
would be correct