Bug #24582
closed
Accept alternative notations for setDBinit
Added by Steffen Gebert almost 14 years ago.
Updated about 6 years ago.
Description
The error messages and deprecation log entries could be improved.
E.g.
This TYPO3 installation is using the $TYPO3_CONF_VARS['SYS']['setDBinit'] property with the following value:
SET NAMES 'utf-8'
It looks like UTF-8 is not used for this connection.
Everything other than UTF-8 is deprecated since TYPO3 4.5.
So please tell me, WHAT you expect! (it's SET NAMES utf8 without the quotes and hyphen (dunno how this got into my config.. ;-))
(issue imported from #M17046)
Files
Need feedback from Benni for the Upgrade Wizard thingy
Sounds to me like the line with "SET NAMES utf8" was not recognized correctly.
It's because of this check:
!preg_match('/SET NAMES utf8/', $TYPO3_CONF_VARS['SYS']['setDBinit'])
Quotes are not accepted..
Another point, which should be improved is the comment for $TYPO3_CONF_VARS['BE']['forceCharset']
This option is deprecated since TYPO3 4.5, and will be removed in 4.7. Please use proper tools to set your installation to native UTF-8.
Setting the value to an empty string in the Install Tool results in putting a line
$TYPO3_CONF_VARS['BE']['forceCharset'] = '';
into localconf.php (see
#24968).
This overwrites the default value of -1. So removing the value from the input field and assuming that then the default is used is not true.
I would state
" -1 is the default value. Set it to -1 or utf-8, which both results in using utf-8, every other setting is deprecated."
You should use the i-option too:
!preg_match('/SET NAMES utf8/i', $TYPO3_CONF_VARS['SYS']['setDBinit'])
- Target version deleted (
0)
You should use the i-option too:
!preg_match('/SET NAMES utf8/i', $TYPO3_CONF_VARS['SYS']['setDBinit'])
+1 for Kurts point - would have saved me an hour today not to chase a loged problem that was none ;)
- Subject changed from Improve non-UTF8 deprecation log entries / messages to Accept alternative notations for setDBinit
- TYPO3 Version set to 6.1
- Status changed from New to Under Review
Please also have a look at #41596.
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF