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

[eluser]Sumon[/eluser]
[quote author="maesk" date="1222867480"]Did you put this in your config/database.php:

Code:
$db['default']['char_set'] = "utf8";
$db['default']['dbcollat'] = "utf8_general_ci";

I use Unicode all the time (not just "é" but also German Umlaute like äöü, daggers and stuff) and it works without problems with CI. No need to use utf8_decode() and utf8_encode().[/quote]

@maesk: yep my configuration file is exactly
Code:
$db['default']['char_set'] = "utf8";
$db['default']['dbcollat'] = "utf8_general_ci";
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. Now, would you please rewrite my code correctly so that i can enter Bon Appétit in database.


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