Project

General

Profile

Feature #79900 ยป TYPO3-8.6.0-Add-Oracle-Install-Unicode-Detection.patch

Mathieu Bouchard, 2017-02-19 06:38

View differences:

typo3_src-8.6.0/typo3/sysext/install/Classes/Controller/Action/Step/DatabaseSelect.php 2017-02-19 00:34:00.941079700 -0500
$connection = GeneralUtility::makeInstance(ConnectionPool::class)
->getConnectionByName(ConnectionPool::DEFAULT_CONNECTION_NAME);
$queryBuilder = $connection->createQueryBuilder();
if ($connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\OraclePlatform) {
$defaultDatabaseCharset = $queryBuilder->select('VALUE')
->from('NLS_DATABASE_PARAMETERS')
->where(
$queryBuilder->expr()->eq(
'PARAMETER',
$queryBuilder->createNamedParameter('NLS_CHARACTERSET', \PDO::PARAM_STR)
)
)
->setMaxResults(1)
->execute()
->fetchColumn();
// Oracle UTF-8 is based on Unicode 3.0. AL32UTF8 has updated Unicode revisions (6.1 in Oracle 12c)
if ($defaultDatabaseCharset) {
$defaultDatabaseCharset = 'utf8';
}
} else {
$defaultDatabaseCharset = $queryBuilder->select('DEFAULT_CHARACTER_SET_NAME')
->from('information_schema.SCHEMATA')
->where(
......
->setMaxResults(1)
->execute()
->fetchColumn();
}
return (string)$defaultDatabaseCharset;
}
    (1-1/1)