Well, I have an idea: 1. Divide the string into octets 2. Convert the octet to hex using intlater chr
3. Attach them and decrypt the utf-8 string to Unicode
This code works for me, but I'm not sure if it prints because I don't have utf-8 in my console (Windows: P).
s = '1101100110000110110110011000001011011000101001111101100010101000'
u = "".join([chr(int(x,2)) for x in [s[i:i+8]
for i in range(0,len(s), 8)
]
])
d = u.decode('utf-8')
Hope this helps!
source
share