Welcome Guest, Not a member yet? Register   Sign In
CI 1.6 and MySQL 4.0 Character Set and Collation
#11

[eluser]James V[/eluser]
Thanks guys, this thread came in handy.
#12

[eluser]xwero[/eluser]
The solution works for lower mysql versions too. I tried it on a 3.23 version mysql.
#13

[eluser]tonanbarbarian[/eluser]
Is a posted in the bug forums i believe the better fix for this is the following

Code:
function db_set_charset($charset, $collation)
    {
        if ($charset===null || $collation===null) return TRUE;
        return @mysql_query("SET NAMES '".$this->escape_str($charset)."' COLLATE '".$this->escape_str($collation)."'", $this->conn_id);
    }

this checks to see if either the charset or collation is set to null, and if so do not try to set.
this is a better option i feel because it allows you to write an app that can work in either mysql 3+ or mysql 4.1+ just by setting the config options to null.

although this would be better served by a reworking of the DB_driver class so that the check for null values is done there and the db_set_charset method is just not called.
#14

[eluser]Derek Jones[/eluser]
Please see the aforementioned post as to why we are not taking approaches that allow circumvention of this setting, tonanbarbarian.
#15

[eluser]internut[/eluser]
doh! was hoping one of the suggested fixes would work. I'm not getting past the:

Unable to set client connection character set

error. doh!

MySQL Version: 4.0.27

Sad




Theme © iAndrew 2016 - Forum software by © MyBB