[TYPO3-core] RFC: Bug #5088: cache is not saved properly because of charset conflict in the database
michael at typo3.org
Mon Apr 2 17:14:43 CEST 2007
> Dmitry Dulepov schrieb:
>> Michael Stucki wrote:
>>> PS: Can you explain me why $TYPO3_CONF_VARS[SYS][setDBinit] = "SET
>>> NAMES utf8;" changes the connection charset to UTF8 (that's expected)
>>> but adding "CHARACTER SET utf8" behind makes it remain as Latin1?
>> Probably a bug... If I remember correctly, SET NAMES is equal to several
>> "SET character_set_xxx=" directives.
> SET NAMES x is the same as these three statements:
> SET character_set_client = x;
> SET character_set_results = x;
> SET character_set_connection = x;
> "CHARACTER SET utf8" means nothing at all and is no valid command.
This was a typo of course. I was using "SET ..." as it is also described
I do not understand why this causes the connection to be reset to the
server default, but I assume it could be one more problem adding trouble
I made a test for this on my console. MySQL is still using Latin1 by
default, so UTF8 must be set for every connection:
mstucki at debian:~$ echo "SET NAMES utf8; SHOW VARIABLES;" | mysql typo3_test | grep -i character_set_
mstucki at debian:~$ echo "SET NAMES utf8; SET CHARACTER SET utf8; SHOW VARIABLES;" | mysql typo3_test | grep -i character_set_
character_set_connection latin1 <== watch this!
Weird, isn't it? Anyway, this is probably too deep in detail, so if you
don't have the solution for this at hand, I suggest to stop this discussion
and I will post it again in typo3.dev...
Use a newsreader! Check out
More information about the TYPO3-team-core