[TYPO3-core] RFC #7942: Enable UTF-8 by default

Steffen Kamper info at sk-typo3.de
Wed Nov 10 13:21:41 CET 2010


Hi,

Xavier Perseguers schrieb:
> Hi,
> 
>>> great to see this feature coming :-) Thanks.
>>>
>>> Steffen Gebert schrieb am 10.11.10 12:21:
>>>
>>>>> $dbConnectionIsUtf8 =
>>>>> trim($GLOBALS['TYPO3_CONF_VARS']['SYS']['setDBinit'], ' ;') == 'SET
>>>>> NAMES utf8' ? TRUE : FALSE;
>>>
>>> I have seen one TYPO3 installation where setDBinit contained not only
>>> the usual and recommended "SET NAMES utf8", but some more
>>> configuration options. So this test will fail, even if the db
>>> connection is meant to be utf8.
>>>
>>> Wouldn't it be better to use a regex then?
>>>
>>
>> yes - it's also not ensured this is the first line of the setting, so
>> search for contain 'SET NAMES utf8' should be the safe way.
> 
> This magic is great but what about non-MySQL databases where "SET NAMES 
> utf8" does not make sense?
> 

maybe we could do this on mysql
SHOW VARIABLES LIKE 'character_set%';
SHOW VARIABLES LIKE 'collation%';


and you could provide simular in DBAL?

vg Steffen


More information about the TYPO3-team-core mailing list