When you doing a multi lingual code some time you will find with unusual character, for example when you doing code in France Language, you will found some character like é

In code igniter, when you use “Language Class” you will create a “Language file” in your language directory application path. The important part is, when you make the “language file” make sure you use right decode method. By default many text editor use ANSI decoding for file format. It must be change to UTF-8 to make sure when you use your language file, it will display right character.

For example, I use Notepad++ editor, I can change the file format into UTF-8 from Toolbar choose “Format” -> “Convert to UTF-8 without BOM”.

Code Example :

$lang['messege_fail_head'] = “Désolé, il ya une erreur”;

With out correct file encoding, when you “echo $this->lang->line(‘messege_fail_head’)

It will display :

D?sol?, il ya une erreur

With correct file encoding (UTF-8)

Désolé, il ya une erreur