Why database result doesn't show accents? Why database result doesn't show accents? codeigniter codeigniter

Why database result doesn't show accents?


After hours searching for something that help me resolve the problem I found an answer so easy in this post so before execute the insertion I used this mysql_query("SET NAMES utf8"); and now the characters are shown as they should. Thank you so much for your help.


did you try to encode your data in UTF-8 before you put them into your new db using this function: http://www.w3schools.com/php/func_xml_utf8_encode.asp


i think you need to change the database collection to UTF 8
execute the following queries .

ALTER DATABASE databasename CHARACTER SET utf8 COLLATE utf8_unicode_ci;ALTER TABLE tablename CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;

hope it will solve your issue .