I am trying to unpack some bytes with struct.unpack()
in Python.
struct.unpack("xb4s", b'\x00\x04G\xe9g\xe9')
But I get : (4, b'G\xe9g\xe9')
instead of (4, Gégé)
. This code does not handle accents. What should I do to have accents ?
I am trying to unpack some bytes with struct.unpack()
in Python.
struct.unpack("xb4s", b'\x00\x04G\xe9g\xe9')
But I get : (4, b'G\xe9g\xe9')
instead of (4, Gégé)
. This code does not handle accents. What should I do to have accents ?