diff -u -r adodb-new-tmp/drivers/adodb-mysql.inc.php adodb/drivers/adodb-mysql.inc.php --- adodb-new-tmp/drivers/adodb-mysql.inc.php 2006-06-07 23:20:13.000000000 -0700 +++ adodb/drivers/adodb-mysql.inc.php 2006-07-25 12:30:11.000000000 -0700 @@ -581,6 +581,32 @@ } + // Functions for managing the client encoding + // Added 2004-06-20 by Kevin Jamieson (http://pkp.sfu.ca/) + function GetCharSet() + { + if (function_exists('mysql_client_encoding')) { + $this->charSet = @mysql_client_encoding($this->_connectionID); + } + + if (!$this->charSet) { + return false; + } else { + return $this->charSet; + } + } + + // SetCharSet - switch the client encoding + function SetCharSet($charset_name) + { + if ($this->Execute('SET NAMES ?', array($charset_name))) { + $this->charSet = $charset_name; + return true; + } else { + return false; + } + } + } /*--------------------------------------------------------------------------------------