// Check if [BE][forceCharset] has been set in localconf.php
if (isset($GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset'])) {
// die() unless we're already on UTF-8
- if ($GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset'] != 'utf-8' && $GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset'] && TYPO3_enterInstallScript !== '1') {
- die('This installation was just upgraded to a new TYPO3 version. Since TYPO3 4.7, utf-8 is always enforced.<br />' . 'The configuration option $GLOBALS[\'TYPO3_CONF_VARS\'][BE][forceCharset] was marked as deprecated in TYPO3 4.5 and is now ignored.<br />' . 'You have configured the value to something different, which is not supported anymore.<br />' . 'Please proceed to the Update Wizard in the TYPO3 Install Tool to update your configuration.');
+ if ($GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset'] != 'utf-8' &&
+ $GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset'] &&
+ TYPO3_enterInstallScript !== '1') {
+
+ die('This installation was just upgraded to a new TYPO3 version. Since TYPO3 4.7, utf-8 is always enforced.<br />' .
+ 'The configuration option $GLOBALS[\'TYPO3_CONF_VARS\'][BE][forceCharset] was marked as deprecated in TYPO3 4.5 and is now ignored.<br />' .
+ 'You have configured the value to something different, which is not supported anymore.<br />' .
+ 'Please proceed to the Update Wizard in the TYPO3 Install Tool to update your configuration.'
+ );
} else {
unset($GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset']);
}
}
- if (isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['setDBinit']) && $GLOBALS['TYPO3_CONF_VARS']['SYS']['setDBinit'] !== '-1' && preg_match('/SET NAMES utf8/', $GLOBALS['TYPO3_CONF_VARS']['SYS']['setDBinit']) === FALSE && TYPO3_enterInstallScript !== '1') {
+
+ if (isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['setDBinit']) &&
+ $GLOBALS['TYPO3_CONF_VARS']['SYS']['setDBinit'] !== '-1' &&
+ preg_match('/SET NAMES utf8/', $GLOBALS['TYPO3_CONF_VARS']['SYS']['setDBinit']) === FALSE &&
+ TYPO3_enterInstallScript !== '1') {
+
// Only accept "SET NAMES utf8" for this setting, otherwise die with a nice error
- die('This TYPO3 installation is using the $GLOBALS[\'TYPO3_CONF_VARS\'][\'SYS\'][\'setDBinit\'] property with the following value:' . chr(10) . $GLOBALS['TYPO3_CONF_VARS']['SYS']['setDBinit'] . chr(10) . chr(10) . 'It looks like UTF-8 is not used for this connection.' . chr(10) . chr(10) . 'Everything other than UTF-8 is unsupported since TYPO3 4.7.' . chr(10) . 'The DB, its connection and TYPO3 should be migrated to UTF-8 therefore. Please check your setup.');
+ die('This TYPO3 installation is using the $GLOBALS[\'TYPO3_CONF_VARS\'][\'SYS\'][\'setDBinit\'] property with the following value:' . chr(10) .
+ $GLOBALS['TYPO3_CONF_VARS']['SYS']['setDBinit'] . chr(10) . chr(10) .
+ 'It looks like UTF-8 is not used for this connection.' . chr(10) . chr(10) .
+ 'Everything other than UTF-8 is unsupported since TYPO3 4.7.' . chr(10) .
+ 'The DB, its connection and TYPO3 should be migrated to UTF-8 therefore. Please check your setup.'
+ );
} else {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['setDBinit'] = 'SET NAMES utf8;';
}