A completely different idea to solve my actual problem:
Someone else suggested to just take out the conversions all together.
I mean, I am converting right back into the encoding I converted from. I
have been assured that no link uses a character above the first 128 (7 bit
ASCII). As far as I
Alright, just forget I suggested that. If in front of a html character a
byte above 127 appears (a character outside of 7 bit ASCII), the control
character would get interpreted as part of the same character in utf-8. In
other words: It WILL break.
The suggestion just sounded too good. Back to the