I have a socket server that is supposed to receive UTF-8 valid characters from clients.
The problem is some clients (mainly hackers) are sending all the wrong kind of
I had same problem with UnicodeDecodeError and i solved it with this line. Don't know if is the best way but it worked for me.
UnicodeDecodeError
str = str.decode('unicode_escape').encode('utf-8')