encoded_str = "AGgAZQBsAGwAb8VIsVUwSjBvMIg="
bin_encoded_str = 0000000001101000000000000110010100000000011011000000000001101100000000000110111111000101010010001011000101010101001100000100101000110000011011110011000010001000
for i in range(int(len(bin_encoded_str)/16)):
decode_str = decode_str + chr("{0:b}".bin_encoded_str[i*16:(i+1)*16])
AttributeError: 'str' object has no attribute 'bin_encoded_str'
I was trying to make a base64 decoder.
Character encoding is using utf-16be.
I want to complete the corresponding Unicode character through the binary string.
decode_str = decode_str + chr(int(bin_encoded_str[i*16:(i+1)*16]))
OverflowError: Python int too large to convert to C int
If you try to change to int type, it overflowed and blocked
Is there a way to solve this?
thanks
intfunction:int(....., 2)?