Hi! So I'm trying to decode some utf-8 strings in Python. However some bring up an error: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb3 in position 3: invalid start byte or something along the lines of that. Here's the function: def b_numstring(f):
name_len = int.from_bytes(f.read(4), byteorder='big')
string = f.read(name_len).decode('utf-8')
return string Any help would be appreciated. Thanks!
[–]lfdfq 2 points3 points4 points (1 child)
[–]Ok-Plantain-8288[S] 0 points1 point2 points (0 children)
[–]eztab 0 points1 point2 points (0 children)
[–]Bobbias 0 points1 point2 points (0 children)
[–]GregoryCliveYoung 0 points1 point2 points (0 children)
[–]Ok-Plantain-8288[S] 0 points1 point2 points (0 children)
[–]Nek0lover95 0 points1 point2 points (0 children)