Something like this should fix the problem:
<?php
$db = new mysqli( "localhost", "DATABASE_USERNAME", "DATABASE_PASSWORD", "DATABASE_NAME" );
$db -> set_charset( "utf8");
$result = $db -> query( "
SELECT
POST_ID,
convert(cast(convert(POST_SUBJECT using latin1) as binary) using utf8),
convert(cast(convert(POST_BODY using latin1) as binary) using utf8),
convert(cast(convert(POST_DEFAULT_BODY using latin1) as binary) using utf8)
FROM
ubbt_POSTS;
" );
while( list( $post_id, $post_subject, $post_body, $post_default_body ) = $result -> fetch_row() )
{
$db -> query( "
UPDATE
ubbt_POSTS
SET
POST_SUBJECT = '" . $db -> escape_string( $post_subject ) . "',
POST_BODY = '" . $db -> escape_string( $post_body ) . "',
POST_DEFAULT_BODY = '" . $db -> escape_string( $post_default_body ) . "'
WHERE
POST_ID = '" . $post_id . "';
" );
echo "Processing post #".$post_id."<br>";
}
$db ->close();
?>
This script is reading and converting the data in the POST_SUBJECT, POST_BODY, POST_DEFAULT_BODY fields to proper UTF-8 and then writes it back to the database. You need to replace DATABASE_USERNAME, DATABASE_PASSWORD, and DATABASE_NAME with your MySQL username, password, and database name.
But please try it first out on a test installation and make a backup of your database before running it