diff --git a/db/db.update.173.php b/db/db.update.173.php index bf28b4f..d097c12 100644 --- a/db/db.update.173.php +++ b/db/db.update.173.php @@ -195,6 +195,19 @@ function db_update_173_post(){ } } + + // finally, we'll update the character encoding on the database itself + global $DBNAME; + $query = "ALTER DATABASE `$DBNAME` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci"; + echo "$query\n"; + $success = mysql_query($query); + if($success){ + echo "Successfully switched database character set to utf8\n"; + }else{ + echo "Unable to switch database character set to utf8\n"; + $totalFailCount++; + } + echo "\nFinished updating values with $totalFailCount failed queries.\n"; }