]> git.joonet.de Git - adminer.git/commitdiff
Use utf8mb4 only if supported
authorJakub Vrana <jakub@vrana.cz>
Fri, 6 Mar 2015 19:56:04 +0000 (11:56 -0800)
committerJakub Vrana <jakub@vrana.cz>
Fri, 6 Mar 2015 19:56:04 +0000 (11:56 -0800)
adminer/include/editing.inc.php

index f5e27e390787175564a189a7152edda77e82ce74..fd2b9e248c8c04ef413acaa4f8c66376712a4957 100644 (file)
@@ -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";
        }
 }