2

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 वि.सं. २०१४ सालमा

2
  • Is UTF-8 enabled in php.ini? Also, $config['charset'] should be set to 'UTF-8' instead of 'UTF8' if I'm not mistaken. Commented May 30, 2013 at 4:57
  • Are you setting the charset in your HTML pages <head>? <meta charset="utf-8"> Commented May 30, 2013 at 5:37

1 Answer 1

2

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;
Sign up to request clarification or add additional context in comments.

4 Comments

thank you very much sir... nepali ma text na aayera last tension bhako thiyo... :)
hehe , glad to know it worked for you... yea dimaag kharaab garney issue yestai ho .. simple cha but easily skip huncha dimaag baata.. :)
@Sld G'tam English please
Worked for me! Been a pain from past day.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.