From: Greg Sabino Mullane Date: Mon, 5 Nov 2007 15:21:59 +0000 (+0000) Subject: Force string to UTF-8 if we have mb stuff available. X-Git-Tag: 1.31.0-rc.0~50998 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=8bf7aad24a4fa54977b90f2a30c9d4303aadf32b;p=lhc%2Fweb%2Fwiklou.git Force string to UTF-8 if we have mb stuff available. --- diff --git a/includes/DatabasePostgres.php b/includes/DatabasePostgres.php index 085d9bc676..edff892ef9 100644 --- a/includes/DatabasePostgres.php +++ b/includes/DatabasePostgres.php @@ -523,6 +523,9 @@ class DatabasePostgres extends Database { } function doQuery( $sql ) { + if (function_exists('mb_convert_encoding')) { + return $this->mLastResult=pg_query( $this->mConn , mb_convert_encoding($sql,'UTF-8') ); + } return $this->mLastResult=pg_query( $this->mConn , $sql); }