[eluser]Unknown[/eluser]
Hi,
I have a simple table, it uses "latin1_swedish_ci" collation.
When i insert it from a simple PHP script without Code Igniter to the same table, the french characters are inserted 100% correctly.
But when i execute the query from Code Igniter to the same table, french chars are replaced with question mark.
Here is my CI code.
Code:
$str = mt_rand(1, 100000).' Digsby est un client multiprotocole de messagerie instantanée qui vous permet de parler avec tous vos amis sur AIM, MSN, Yahoo, ICQ, Google Talk et Jabber avec une liste de contacts simple à gérer.';
$this->db->simple_query("SET NAMES UTF8");
$q2 = "UPDATE `test` SET `something` = '$str' WHERE `the_id` = 2 LIMIT 1";
var_dump($q2);
$this->db->query($q2);
Even when i var_dump() the query, the query is normal (french chars are not replaced). But on phpmyadmin, it is not inserted correctly.
Here are the french characters
Digsby est un client multiprotocole de messagerie instantanée qui vous permet de parler avec tous vos amis sur AIM, MSN, Yahoo, ICQ, Google Talk et Jabber avec une liste de contacts simple à gérer.