-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
对于一些可能非UTF-8编码的字节序直接使用可能会报错,需要修改一下getProtobufPart函数
else: if IsType: return part_type, part_value.decode("utf-8") return part_value.decode("utf-8")
修改为
else: try: text = part_value.decode("utf-8") if IsType: return part_type, text return text except UnicodeDecodeError: if IsType: return part_type, binascii.hexlify(part_value).decode('utf-8') # Convert binary to hex string return binascii.hexlify(part_value).decode('utf-8')
即可
Metadata
Metadata
Assignees
Labels
No labels