From e7436140e37c260b6bde073fc1372d07a8a50d79 Mon Sep 17 00:00:00 2001 From: David Goodwin Date: Thu, 20 Sep 2007 14:25:11 +0000 Subject: [PATCH] functions.inc.php: unicode patch from amsys (thank you) - see http://sourceforge.net/tracker/index.php?func=detail&aid=1798757&group_id=191583&atid=937966 git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@61 a1433add-5e2c-0410-b055-b7f2511e0802 --- functions.inc.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/functions.inc.php b/functions.inc.php index 2a2c819a..bb9dc989 100644 --- a/functions.inc.php +++ b/functions.inc.php @@ -1198,6 +1198,7 @@ function db_connect () if (function_exists ("mysql_connect")) { $link = @mysql_connect ($CONF['database_host'], $CONF['database_user'], $CONF['database_password']) or die ("

DEBUG INFORMATION:
Connect: " . mysql_error () . "$DEBUG_TEXT"); + @mysql_query("SET CHARACTER SET utf8",$link); $succes = @mysql_select_db ($CONF['database_name'], $link) or die ("

DEBUG INFORMATION:
MySQL Select Database: " . mysql_error () . "$DEBUG_TEXT"); } else @@ -1212,6 +1213,7 @@ function db_connect () if (function_exists ("mysqli_connect")) { $link = @mysqli_connect ($CONF['database_host'], $CONF['database_user'], $CONF['database_password']) or die ("

DEBUG INFORMATION:
Connect: " . mysqli_connect_error () . "$DEBUG_TEXT"); + @mysqli_query($link,"SET CHARACTER SET utf8"); $succes = @mysqli_select_db ($link, $CONF['database_name']) or die ("

DEBUG INFORMATION:
MySQLi Select Database: " . mysqli_error () . "$DEBUG_TEXT"); } else @@ -1227,6 +1229,7 @@ function db_connect () { $connect_string = "host=" . $CONF['database_host'] . " dbname=" . $CONF['database_name'] . " user=" . $CONF['database_user'] . " password=" . $CONF['database_password']; $link = @pg_pconnect ($connect_string) or die ("

DEBUG INFORMATION:
Connect: " . pg_last_error () . "$DEBUG_TEXT"); + pg_set_client_encoding($link, UNICODE); } else {