Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter messing up é's
#9

[eluser]maesk[/eluser]
[quote author="Sumon" date="1222911200"]

@maesk: yep my configuration file is exactly
Code:
$db['default']['char_set'] = "utf8";
$db['default']['dbcollat'] = "utf8_general_ci";
[/quote]

I actually wondered about the OP's config but the problem seems to be the same.

[quote author="Sumon" date="1222911200"]
i get "Bon Appétit" using $_POST['username']. but when i have tried to insert it into database. it doesn't work for
Code:
$this->db->set('name',$username);
But when i use
[/code]
$this->db->set('name', utf8_encode($username));
[code]
it works fine.
[/quote]

Yeah, that's strange, doesn't happen in my install of CI.

[quote author="Sumon" date="1222911200"]
Now, would you please rewrite my code correctly so that i can enter Bon Appétit in database.[/quote]

Nope. Sorry, but I don't have time for this right now. All I'm saying is that I do not experience any problems with Unicode in CI and I don't use utf8_encode(). I just tried it with scaffolding and entered "Bon Appétit" and other accented characters into the DB and it works perfectly and scaffolding doesn't use utf8_encode() as far as I can see.

If you want to use utf8_encode() and it works for you that's fine with me!


Messages In This Thread
CodeIgniter messing up é's - by El Forum - 09-28-2008, 07:45 AM
CodeIgniter messing up é's - by El Forum - 09-30-2008, 11:41 AM
CodeIgniter messing up é's - by El Forum - 09-30-2008, 01:19 PM
CodeIgniter messing up é's - by El Forum - 09-30-2008, 01:25 PM
CodeIgniter messing up é's - by El Forum - 09-30-2008, 01:27 PM
CodeIgniter messing up é's - by El Forum - 10-01-2008, 02:24 AM
CodeIgniter messing up é's - by El Forum - 10-01-2008, 02:29 AM
CodeIgniter messing up é's - by El Forum - 10-01-2008, 02:33 PM
CodeIgniter messing up é's - by El Forum - 10-01-2008, 03:20 PM
CodeIgniter messing up é's - by El Forum - 10-02-2008, 07:33 AM



Theme © iAndrew 2016 - Forum software by © MyBB