This is a little above my head.
But there is a utility for mysql to change the encoding.
At least in phpmyadmin.
And the script provided seems to only address a few tables.
Where ubb has around 65 tables.
Then you still need to edit the scripts to write new data to the new format.