Index: lib.php =================================================================== RCS file: /cvsroot/moodle/moodle/auth/db/Attic/lib.php,v retrieving revision 1.25.2.4 diff -u -r1.25.2.4 lib.php --- lib.php 29 Jan 2007 23:44:58 -0000 1.25.2.4 +++ lib.php 10 Feb 2007 20:27:26 -0000 @@ -94,6 +94,11 @@ $authdb = &ADONewConnection(); $authdb->PConnect($CFG->auth_dbhost,$CFG->auth_dbuser,$CFG->auth_dbpass,$CFG->auth_dbname); $authdb->SetFetchMode(ADODB_FETCH_ASSOC); ///Set Assoc mode always after DB connection +/// If connecting to MySQL or PostgreSQL, always set the communication channel to UTF8, some lines +/// below we'll decode back to ISO for sites not running under Unicode. MDL-8479 + if ($CFG->auth_dbtype == 'mysql' || $CFG->auth_dbtype == 'postgres7') { + $authdb->Execute("SET NAMES 'utf8'"); + } $fields = array("firstname", "lastname", "email", "phone1", "phone2", "department", "address", "city", "country", "description",