Feature #71454
closedAllow setting Connection Charset
0%
Description
There should be a possibility to set the connection charset within the Install Tool. If you want to use 4-byt-UTF8 characters for example, you need to convert your databse to utf8mb4. Thus, you have to set your connection charset accordingly.
Even though the Database Handler has a method for this ( \TYPO3\CMS\Core\Database\DatabseConnection::setConnectionCharset ) there seems to be no way to actually call this method during initialization.
It should be no problem to introduce a setting for the connection charset within the DB section of the install tool. It could then be used in
\TYPO3\CMS\Core\Core\Bootstrap::initializeTypo3DbGlobal
like this:
if (isset($GLOBALS['TYPO3_CONF_VARS']['DB']['connectionCHarset']) && trim() != '$GLOBALS['TYPO3_CONF_VARS']['DB']['connectionCHarset']') { $databaseConnection->setConnectionCharset( trim($GLOBALS['TYPO3_CONF_VARS']['DB']['connectionCHarset']) ); }
If this feature should be introduced (which I strongly hope), an adjustment of the install tool would also be necessary. I did not investigate on this any further, but my assumption is that the install tool itself does not execute the commands in setDBinit which leads to an exception because of the connection charset check.
Updated by Morton Jonuschat almost 9 years ago
- Category changed from Install Tool to Database API (Doctrine DBAL)
Updated by Wouter Wolters over 8 years ago
- Status changed from New to Closed
With version 8 in you can set the connection charset in the configuration.
The DatabaseConnection class won't receive any new features.
I'm closing this ticket as solved in version 8.
Updated by Riccardo De Contardi over 6 years ago
- Related to Feature #80398: Make default charset and collation for new tables configurable added