well, the best solution in my head is manually update,
take a database backup, configure and put this file in anywhere in your web server and use it.
edit i forgot to say add a new column named reconfigured to this table
<?php
$server = "localhost";
$username = "root";
$password = "";
$database = "database";
$table = "corrupted table";
//utf8
$con = mysqli_connect($server, $username, $password, $database);
mysqli_set_charset($con,"utf8");
//auto
$con2 = mysqli_connect($server, $username, $password, $database);
if (isset($_GET['id']) and isset($_GET['which'])) {
switch($_GET['which']) {
case 1: $correct_string = mysqli_query($con, "SELECT name FROM `".$table." WHERE `id`='".$_GET['id']."'"); $correct_string = mysqli_fetch_row($con, $correct_string); break;
case 2: $correct_string = mysqli_query($con2, "SELECT name FROM `".$table." WHERE `id`='".$_GET['id']."'"); $correct_string = mysqli_fetch_row($con2, $correct_string); break;
}
mysqli_query($con, "UPDATE `".$table."` SET `name` = '".$correct_string['0']."' WHERE `".$table."`.`id` = '".$_GET['id']."'");
mysqli_query($con, "UPDATE `".$table."` SET `reconfigured` = '1' WHERE `".$table."`.`id` = '".$_GET['id']."'");
}
$string1 = mysqli_query($con, "SELECT name FROM `".$table."` WHERE reconfigured = '0' LIMIT 1");
$string2 = mysqli_query($con2, "SELECT name FROM `".$table."` WHERE reconfigured = '0' LIMIT 1");
$string1 = mysqli_fetch_row($con, $string1);
$string2 = mysqli_fetch_row($con2, $string2);
$string1 = $string1['0'];
$string2 = $string2['0'];
?>
<form action="">
<input type="text" id="id" name="id" value="<?= $id ?>"></input><br>
<input type="radio" id="which" name="which" value="1"><?= $string1 ?><br>
<input type="radio" id="which" name="which" value="2"><?= $string2 ?><br><br>
<input type="submit" value="continue">
</form>
i haven't tested this script, use with caution and take a database backup
edit, this way is automatic, if it has one of the broken words (like œ) it updates it with the other method, i double checked the code but you check too and take a database backup again, i kinda don't trust myself
<?php
$broken = array('×', '¢', 'œ', 'ª');
$server = "localhost";
$username = "root";
$password = "";
$database = "database";
$table = "corrupted table";
//utf8
$con = mysqli_connect($server, $username, $password, $database);
mysqli_set_charset($con,"utf8");
//auto
$con2 = mysqli_connect($server, $username, $password, $database);
$fixed = 0;
while ($fixed == 1) {
$string1 = mysqli_query($con, "SELECT name FROM `".$table."` WHERE reconfigured = '0' LIMIT 1");
$string2 = mysqli_query($con2, "SELECT name FROM `".$table."` WHERE reconfigured = '0' LIMIT 1");
$string1 = mysqli_fetch_row($con, $string1);
$string2 = mysqli_fetch_row($con2, $string2);
if(implode(null,$string1) == null){ die('done'); }
if(implode(null,$string2) == null){ die('done'); }
$string1 = $string1['0'];
$string2 = $string2['0'];
while ($found == 1) {
foreach ($broken as $badword) {
if(strpos($string1, $badword)) { $found = 1; $broken = 1; }
}
$found = 1;
}
if ($broken == 1) {
mysqli_query($con, "UPDATE `".$table."` SET `name` = '".$string2."' WHERE `".$table."`.`id` = '".$id."'");
}
mysqli_query($con, "UPDATE `".$table."` SET `reconfigured` = '1' WHERE `".$table."`.`id` = '".$id."'");
unset($broken);
unset($found);
}
?>