From: Jakub Vrana Date: Tue, 10 Mar 2015 16:21:30 +0000 (-0700) Subject: MySQL: Try to set utf8mb4 if possible X-Git-Tag: v4.2.1~1 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=c5ae82ab5b992f8328a13782712b8f4b89356248;p=adminer.git MySQL: Try to set utf8mb4 if possible --- diff --git a/adminer/drivers/mysql.inc.php b/adminer/drivers/mysql.inc.php index 661a18b0..47f22a2a 100644 --- a/adminer/drivers/mysql.inc.php +++ b/adminer/drivers/mysql.inc.php @@ -28,6 +28,9 @@ if (!defined("DRIVER")) { } function set_charset($charset) { + if (parent::set_charset($charset)) { + return true; + } // the client library may not support utf8mb4 parent::set_charset('utf8'); return $this->query("SET NAMES $charset"); @@ -86,6 +89,9 @@ if (!defined("DRIVER")) { */ function set_charset($charset) { if (function_exists('mysql_set_charset')) { + if (mysql_set_charset($charset, $this->_link)) { + return true; + } // the client library may not support utf8mb4 mysql_set_charset('utf8', $this->_link); }