Gihan Lasita Gihan Lasita - 7 months ago 90
PHP Question

how to insert unicode data into table with codeigniter?

My database config file is set to

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

but every time i insert Unicode Characters, they are insert as ????? question marks.

my mysql database info as

Type : MyISAM
Collation : latin1_swedish_ci

any idea what im doing wrong and how to fix the issue?



the problem mostly with your database collation, you must make it utf-8 since your

$db['default']['dbcollat'] = 'utf8_general_ci';

is not the same as your database collation.