Feature #71454

Allow setting Connection Charset

Added by Christian Wellinghorst about 5 years ago. Updated over 4 years ago.

Should have
Database API (Doctrine DBAL)
Target version:
Start date:
Due date:
% Done:


Estimated time:
PHP Version:
Sprint Focus:


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
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.

Related issues

Related to TYPO3 Core - Feature #80398: Make default charset and collation for new tables configurableClosed2017-03-22


Updated by Riccardo De Contardi about 5 years ago

  • Category set to Install Tool

Updated by Morton Jonuschat almost 5 years ago

  • Category changed from Install Tool to Database API (Doctrine DBAL)

Updated by Wouter Wolters over 4 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 2 years ago

  • Related to Feature #80398: Make default charset and collation for new tables configurable added

Also available in: Atom PDF