Use utf8mb4 only if supported
This commit is contained in:
parent
c7f302ca0b
commit
26dafd9320
|
@ -529,9 +529,10 @@ function db_size($db) {
|
||||||
* @return null
|
* @return null
|
||||||
*/
|
*/
|
||||||
function set_utf8mb4($create) {
|
function set_utf8mb4($create) {
|
||||||
|
global $connection;
|
||||||
static $set = false;
|
static $set = false;
|
||||||
if (!$set && preg_match('~\butf8mb4~i', $create)) { // possible false positive
|
if (!$set && preg_match('~\butf8mb4~i', $create)) { // possible false positive
|
||||||
$set = true;
|
$set = true;
|
||||||
echo "SET NAMES utf8mb4;\n\n";
|
echo "SET NAMES " . charset($connection) . ";\n\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue