dbtry('ALTER TABLE ' . $table . ' CONVERT TO CHARACTER SET ' . $this->db->char_set . ' COLLATE ' . $this->db->dbcollat); // fix existing tables that haven't already been fixed } $this->dbtry('ALTER DATABASE `' . $this->db->database . '` CHARACTER SET ' . $this->db->char_set . ' COLLATE ' . $this->db->dbcollat); // fix the database default } public function down() { // Not Possible } function dbtry($what) { try { $this->db->query($what); } catch (Exception $e) { log_message("error", "Error setting character set/collation: ".$e." // Executing: ".$this->db->last_query()); } } } ?>