SId G'tAm
SId G'tAm

Reputation: 47

Displaying UTF8 Character on Codeigniter

Config.php

$config['charset'] = 'UTF8';

database.php

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

html header

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

my database has the collation of utf8_general_ci and my all files are encoded on utf8 even though i could not display my unicode character on my page

this always displays वि.सं. २०१४ सालमा

Upvotes: 2

Views: 10280

Answers (1)

Sudhir Bastakoti
Sudhir Bastakoti

Reputation: 100175

you need to make sure you have utf8 everywhere, like in config.php

$config['charset'] = "UTF-8"; //not UTF8

in php.ini

default_charset = "utf-8"

for database

DEFAULT CHARSET=utf8;

Upvotes: 2

Related Questions