summaryrefslogtreecommitdiff
path: root/scripts/fixup_utf8.php
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/fixup_utf8.php')
-rw-r--r--scripts/fixup_utf8.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/fixup_utf8.php b/scripts/fixup_utf8.php
index 67f9c4623..925da2484 100644
--- a/scripts/fixup_utf8.php
+++ b/scripts/fixup_utf8.php
@@ -121,10 +121,14 @@ function doConnect($charset)
return NULL;
}
- $result = $db->query("SET NAMES $charset");
+// $result = $db->query("SET NAMES $charset");
- if (PEAR::isError($result)) {
- echo "ERROR: " . $result->getMessage() . "\n";
+ $conn = $db->connection;
+
+ $succ = mysqli_set_charset($conn, $charset);
+
+ if (!$succ) {
+ echo "ERROR: couldn't set charset\n";
$db->disconnect();
return NULL;
}