I'm attempting to store IP packet payloads in a PostgreSQL database with Django.
Currently, I'm storying the payload as a CharField.
I'm getting this error:
django.db.utils.DatabaseError: invalid byte sequence for encoding "UTF8": 0xedbc93
HINT: This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by "client_encoding".
Is there any way to sanely store this data? I'm able to do str(packet.payload)
with no errors, but when Django tries to save the object it throws the encoding error. A bytestring seems like the obvious solution, but it doesn't look like Django supports that.