Actions
Feature #80398
closedMake default charset and collation for new tables configurable
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
Start date:
2017-03-22
Due date:
% Done:
100%
Estimated time:
PHP Version:
7.0
Tags:
charset utf8mb4
Complexity:
Sprint Focus:
Description
to be able to store 4 byte unicode characters we need to set database to utf8mb4. since typo3 8 there is a configuration parameter for that but it seems that it is not taken into account.
LocalConfiguration.php
'DB' => [ 'Connections' => [ 'Default' => [ 'charset' => 'utf8mb4', 'dbname' => '--dbname--', 'driver' => 'mysqli', 'host' => '127.0.0.1', 'password' => '--mypassword--', 'port' => 3306, 'user' => '--myuser--', ], ], ],
create table statements do have a fallback but do not read from configuration
private function buildTableOptions(array $options) { if (isset($options['table_options'])) { return $options['table_options']; } $tableOptions = array(); // Charset if ( ! isset($options['charset'])) { $options['charset'] = 'utf8'; } .... }
DatabaseConnection class also does not read charset configuration either it takes utf8 as a default.
$connection = \Doctrine\DBAL\DriverManager::getConnection([ 'driver' => 'mysqli', 'wrapperClass' => Connection::class, 'host' => $host, 'port' => (int)$this->databasePort, 'unix_socket' => $this->databaseSocket, 'user' => $this->databaseUsername, 'password' => $this->databaseUserPassword, 'charset' => $this->connectionCharset, ]);
it was stated that it would be fixed in CMS 8
https://forge.typo3.org/issues/71454
is this on roadmap? before LTS?
Files
Actions