From 26dafd93208e02301e807f4a979412b41d1265a0 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Fri, 6 Mar 2015 11:56:04 -0800 Subject: [PATCH] Use utf8mb4 only if supported --- adminer/include/editing.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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"; } }