Welcome Guest, Not a member yet? Register   Sign In
[SOLVED] Character Encoding
#1

[eluser]julien.1486[/eluser]
Hello guys !

I'm using CI since few days. I'm trying to rebuild a website with CI and I have a small problem. I want to use iso-8859-1 encoding, and it works except if I use the html helpers.

In my view, I write directly a small text with special chars (é, è..etc.. yes, french is a boring language :-p) and at the end I use the ul() function.
When I load it with my browser I can see that the ul() function returns a text with a bad encoding (If a switch to UTF-8 with my browser then the text displayed by ul() is correct, not the one I've written directly).

In my application/config/config.php I've written :

Code:
$config['charset'] = "ISO-8859-1";

I use Eclipse PDT and it's configured to use iso-8859-1 encoding.

So, what's wrong ?

Thanks for your help :-)
#2

[eluser]julien.1486[/eluser]
Erf... It's ok.

Actually, I had a previous project which was using UTF-8 encoding in Eclipse, and I've started a new project but I've choose the ISO-8859-1 encoding.
I've done a Copy/Paste from the old project (UTF-8) to the new one (ISO-8859-1) and the strange characters appeared in the editor, not in the ul() function.

Now it's ok, character are correctly displayed !
#3

[eluser]julien.1486[/eluser]
Yes, you're right.

But I've read that a lot of servers and software still use the iso-8859-1 encoding by default and it can cause some problems.
Actually, I will use UTF-8 and if I it causes problems I'll return back to iso-8859-1 (I use my ISP's host).




Theme © iAndrew 2016 - Forum software by © MyBB