![]() |
No able to insert accentuated french word - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: No able to insert accentuated french word (/showthread.php?tid=62511) |
No able to insert accentuated french word - Genloga - 07-23-2015 Hi there, i have been trying to insert some french word into a mysql database but nothing was recording. After doing some research i came with some ideas telling to just utf8_encode the data before inserting them. I have try this but nothing happens also ![]() ![]() RE: No able to insert accentuated french word - Wouter60 - 07-23-2015 I had the same problem. It took me a lot of research to get it fixed. I use the "utf8_general_ci" collation for my database (and for the tables inside it). In the head section of my views, I have: <meta charset="UTF-8" /> In CodeIgniter's config.php file, I have: $config['charset'] = 'UTF-8'; In CodeIgniter's database.php file, I have: 'char_set' => 'utf8', 'dbcollat' => 'utf8_general_ci', And all my CodeIgniter controllers, libraries, models and views are saved as Utf-8 files (not plain ASCII). My text editor has an option for that. Hope this will help you. |