hpi-epic/pyHANA

emoji & Special symbols decode('utf-8') error

oyrm opened this issue · 3 comments

oyrm commented

file:types.py
modify :return payload.read(length).decode('cesu-8')
to:return payload.read(length).decode('cesu-8', errors='ignore')

Special symbols :☎☏✄☪☣☢☠♨« »큐〓㊚㊛囍㊒㊖☑✔☐☒✘㍿☯☰☷♥♠♤❤♂♀★☆☯✡※

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xed in position 7: invalid continuation byte

The solution I think of now is to ignore, if you have a good way of handling, please teach, thank you.

Hmm, I am not entirely sure whether we want to silently ignore certain chars.

oyrm commented

For the code to run normally, I can only ignore it first.
I don't know if there is a better way to solve it.

@TwoLaid What's your opinion on that?