CodeIgniter Forums
load->view and utf8 encoding - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: load->view and utf8 encoding (/showthread.php?tid=16428)



load->view and utf8 encoding - El Forum - 03-06-2009

[eluser]haderach[/eluser]
Hi all,

i'm creating a site in french. So i need utf encoding for my page. In this exmaple
Code:
$this->load->view('template/header');
$this->load->view('template/navigation');
$this->load->view('template/gaucheOffre',$data);
$this->load->view('offre/content_offre',$data);
$this->load->view('template/footer');

when the file header.php, navigation.php etc... are save in format utf8 i have an additional character zt the begining of the each file (when it's executed). So the presentation is not good.

if the files are saved in an other format, this additionnal charecter does'nt exist.

Any ideas?

Thanks


load->view and utf8 encoding - El Forum - 03-06-2009

[eluser]vitoco[/eluser]
Hi, i think you are saving the files in UTF8 "with BOM", it's a maybe, not sure at all.but you can try if that's the problem.

Saludos


load->view and utf8 encoding - El Forum - 03-06-2009

[eluser]pistolPete[/eluser]
Try saving the file in UTF-8 without BOM (Byte-order mark).


load->view and utf8 encoding - El Forum - 03-06-2009

[eluser]haderach[/eluser]
what does it mean "with bom"

sorry Wink


load->view and utf8 encoding - El Forum - 03-06-2009

[eluser]haderach[/eluser]
thanks pistolPete for the explaination

i'll check


load->view and utf8 encoding - El Forum - 03-06-2009

[eluser]haderach[/eluser]
how can i do to save the file without the bom. What sort of editor can i use?


load->view and utf8 encoding - El Forum - 03-06-2009

[eluser]vitoco[/eluser]
on windows you can use Notepad++ , on linux you can use Geany ( almost identical to Notepad++ )


load->view and utf8 encoding - El Forum - 03-06-2009

[eluser]haderach[/eluser]
Thanks a lot. It works fine now. Wink
I used notepad++.

Do you know if it's possible with jedit to save the files without bom?


load->view and utf8 encoding - El Forum - 03-06-2009

[eluser]vitoco[/eluser]
i don't use jedit. sorry