2.4 and mysql utf-8

I remember having seen a statement that the mysql connection in SS 2.4 would default to utf-8, but I cannot find that statement anymore. It might have been in a bug ticket about utf-8. So my question is, how about the default for 2.4, will mysql connections default to utf-8?

If it's meant to be like that, then it didn't work in my tests. The code in MySQLDatabase.php Line 43

did it. But that would be hacking the core. I think the current code had flexibility in mind, so let me propose a solution which is flexible but still enforces UTF-8 (or whatever I want) if I want to. Simply add in mysite/_config.php one setting encoding in $databaseConfig and have MySQLDatabase.php use it (if present):

Error: Couldn't run query: SET CHARACTER SET 'utf8'
At line 536 in /home/sites/mysite.co.uk/public_html/sapphire/core/model/MySQLDatabase.php

user_error(Couldn't run query: SET CHARACTER SET 'utf8' ,256) line 536 of MySQLDatabase.php MySQLDatabase->databaseError(Couldn't run query: SET CHARACTER SET 'utf8' | ,256) line 134 of MySQLDatabase.php MySQLDatabase->query(SET CHARACTER SET 'utf8') line 60 of MySQLDatabase.php MySQLDatabase->__construct(Array) line 94 of DB.php DB::connect(Array) line 121 of main.php

EDIT:

and this:

Error: Couldn't run query: SET CHARACTER SET 'utf8'
At line 536 in /home/sites/mysite.co.uk/public_html/sapphire/core/model/MySQLDatabase.php

Couldn't run query: SET CHARACTER SET 'utf8'
Line 536 of MySQLDatabase.php
MySQLDatabase->databaseError(Couldn't run query: SET CHARACTER SET 'utf8' | ,256)
Line 134 of MySQLDatabase.php
MySQLDatabase->query(SET CHARACTER SET 'utf8')
Line 60 of MySQLDatabase.php
MySQLDatabase->__construct(Array)
Line 94 of DB.php
DB::connect(Array)
Line 121 of main.php