Skip to content

Commit c45c6b7

Browse files
committed
MySQL full unicode support
1 parent 9908a9d commit c45c6b7

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

gha.dist.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ jobs:
2020
env:
2121
MYSQL_USER: 'root'
2222
MYSQL_ALLOW_EMPTY_PASSWORD: "true"
23+
MYSQL_CHARACTER_SET_SERVER: "utf8mb4"
24+
MYSQL_COLLATION_SERVER: "utf8mb4_unicode_ci"
25+
2326
ports:
2427
- 3306:3306
2528
options: --health-cmd="mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 3

src/Installer/Database/MySQLDatabase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function getCreateDatabaseCommand()
2424
$passOpt = !empty($this->pass) ? ' --password='.escapeshellarg($this->pass) : '';
2525
$user = escapeshellarg($this->user);
2626
$host = escapeshellarg($this->host);
27-
$createDB = escapeshellarg(sprintf('CREATE DATABASE `%s` DEFAULT CHARACTER SET UTF8 COLLATE utf8_general_ci;', $this->name));
27+
$createDB = escapeshellarg(sprintf('CREATE DATABASE `%s` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;', $this->name));
2828

2929
return sprintf('mysql -u %s%s -h %s -e %s', $user, $passOpt, $host, $createDB);
3030
}

0 commit comments

Comments
 (0)