I inherited a web system that I need to develop further. The system seems to be created by someone who read two chapters of a PHP tutorial and thought he could code...
I managed to solve it by running updates on text fields like this:
UPDATE table SET title = CONVERT(CONVERT(CONVERT(title USING latin1) USING binary) USING UTF8)