From: Jakub Vrana Date: Fri, 6 Mar 2015 19:56:04 +0000 (-0800) Subject: Use utf8mb4 only if supported X-Git-Tag: v4.2.1~5 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=26dafd93208e02301e807f4a979412b41d1265a0;p=adminer.git Use utf8mb4 only if supported --- diff --git a/adminer/include/editing.inc.php b/adminer/include/editing.inc.php index f5e27e39..fd2b9e24 100644 --- a/adminer/include/editing.inc.php +++ b/adminer/include/editing.inc.php @@ -529,9 +529,10 @@ function db_size($db) { * @return null */ function set_utf8mb4($create) { + global $connection; static $set = false; if (!$set && preg_match('~\butf8mb4~i', $create)) { // possible false positive $set = true; - echo "SET NAMES utf8mb4;\n\n"; + echo "SET NAMES " . charset($connection) . ";\n\n"; } }