From: Reini U. <ru...@us...> - 2005-02-07 15:41:40
|
Update of /cvsroot/phpwiki/phpwiki/lib/WikiDB/backend In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10896/WikiDB/backend Modified Files: ADODB_mysql.php PearDB_mysql.php Log Message: define mysql connection charset Index: ADODB_mysql.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/WikiDB/backend/ADODB_mysql.php,v retrieving revision 1.12 retrieving revision 1.13 diff -u -2 -b -p -d -r1.12 -r1.13 --- ADODB_mysql.php 18 Jan 2005 20:55:46 -0000 1.12 +++ ADODB_mysql.php 7 Feb 2005 15:41:29 -0000 1.13 @@ -43,4 +43,12 @@ extends WikiDB_backend_ADODB $this->_expressions['maxminor'] = "MAX(IF(minor_edit<>0,version,0))"; } + + if ($this->_serverinfo['version'] > 401.0) { + global $charset; + //http://dev.mysql.com/doc/mysql/en/charset-connection.html + //SET NAMES 'latin1' or 'utf8' + mysql_query("SET NAMES '$charset'"); + //SET CHARACTER SET latin1 for the default database. + } } Index: PearDB_mysql.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/WikiDB/backend/PearDB_mysql.php,v retrieving revision 1.16 retrieving revision 1.17 diff -u -2 -b -p -d -r1.16 -r1.17 --- PearDB_mysql.php 18 Jan 2005 20:55:48 -0000 1.16 +++ PearDB_mysql.php 7 Feb 2005 15:41:29 -0000 1.17 @@ -24,4 +24,11 @@ extends WikiDB_backend_PearDB $this->_expressions['maxminor'] = "MAX(IF(minor_edit<>0,version,0))"; } + if ($this->_serverinfo['version'] > 401.0) { + global $charset; + //http://dev.mysql.com/doc/mysql/en/charset-connection.html + //SET NAMES 'latin1' + mysql_query("SET NAMES '$charset'"); + //"SET CHARACTER SET latin1" for the default database. + } } } |