UnicodeDecodeError: 'utf8' codec can't decode byte 0x9c
<p>This is one of the culprit characters: œ</p>

<p>I need to be able to make the string UTF-8 somehow.</p>

<p>Please note that files are UTF-8 and that the origin of the string is a client socket connection. I need a way to convert any non UTF-8 string to UTF-8.</p>

<p><strong>EDIT:</strong>
My solution is good enough for my case where the problematic characters are extras that I can discard safely. They are the result of the fact that I cannot control all clients that connect to my server and some clients seem to be sharing a common socket library or something that ads  the extra characters. 
Normal they should not be there as the entire transmission should only contain UTF-8.</p>

<p>I would however be more then happy to chose any answer that gives me a general solution that can convert the string to UTF-8 not just some copy pasted answers from the first Google result like some people just did to get some extra experience. </p>

<p>I don't care if I convert or remove the extra characters the data sent is something to be analyzed by humans so it does not matter, but a real solution does.</p>

<p>Can someone actually think for once and come up with a fully working solution?</p>
