//check database character set and collation //if (eregi('mysql', $DBtype)) { //$rs = $db->Execute("SHOW CREATE DATABASE $DBname"); // $dbInfo = $rs->FetchRow(); //$defcharset = ''; //$pattern = '/40100 DEFAULT CHARACTER SET (\w+) /'; //if ( (preg_match($pattern, $dbInfo[1], $match) > 0) ) { // $defcharset = $match[1]; // } //if (!eregi('utf8', $defcharset)) { // $db->Execute("ALTER DATABASE $DBname DEFAULT CHARACTER SET 'utf8' DEFAULT COLLATE 'utf8_general_ci'"); //} // $db->Execute('SET NAMES utf8'); //datahell 28.09.2006 //}