Project

General

Profile

Actions

Feature #71454

closed

Allow setting Connection Charset

Added by Christian Wellinghorst over 8 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2015-11-10
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

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.


Related issues 1 (0 open1 closed)

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

Actions
Actions

Also available in: Atom PDF