I have a Database with BLOB in it. I tryed to read and save in file it but it didnt work. Then i just write raw bytes and get it
b'xcbxd2x00xd2Nxa9}sxc7xc2x8fx02nx11xc2xeexb2s x93&xe6ux97xe9@xba'
I try to decode it with any encoding scheme but it also didn’t work. This BLOB must contain some test files.
How to get it?
Code to convert to file:
def writeTofile(data, filename):
with open(filename, 'wb') as file:
file.write(data)
print("Stored blob data into: ", filename, "n")
Code to decode data from BLOB(after extraction):
try:
decoded_text = decoded_bytes.decode('utf-8')
print("Decoded as UTF-8:", decoded_text)
except UnicodeDecodeError:
print("Failed to decode as UTF-8")
New contributor
Gregglikehipi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
0