From a262f83210f6a405bfe79148b52387d1dbdd9a5d Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Sat, 30 May 2009 12:20:42 -0400 Subject: [PATCH] use mysqli_set_charset instead of set names --- scripts/fixup_utf8.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/fixup_utf8.php b/scripts/fixup_utf8.php index 67f9c46236..925da24844 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; } -- 2.39.5