From e8ae6c912d587ee72de0841a8fdbb43224de5ab2 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Mon, 26 Jul 2021 16:54:22 +0200 Subject: [PATCH] PreferencesCommand: Always use `utf8` as connection charset --- .../migrate/application/clicommands/PreferencesCommand.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/migrate/application/clicommands/PreferencesCommand.php b/modules/migrate/application/clicommands/PreferencesCommand.php index 65f2b43da..fa2bad50c 100644 --- a/modules/migrate/application/clicommands/PreferencesCommand.php +++ b/modules/migrate/application/clicommands/PreferencesCommand.php @@ -35,7 +35,9 @@ class PreferencesCommand extends Command $resource = $this->params->getRequired('resource'); } - $connection = ResourceFactory::create($resource); + $resourceConfig = ResourceFactory::getResourceConfig($resource); + $resourceConfig->charset = 'utf8'; + $connection = ResourceFactory::createResource($resourceConfig); $preferencesPath = Config::resolvePath('preferences'); if (! file_exists($preferencesPath)) {