CodeIgniter Forums
Problem displaying some chars - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Problem displaying some chars (/showthread.php?tid=36081)



Problem displaying some chars - El Forum - 11-20-2010

[eluser]fatman[/eluser]
Hi,

I have a php page that contains some text:

Quote:By clicking the “+” “-”

the problem is that when i run it on xampp i get:

Quote:By clicking the �+� �-�

any idea how i can fix this?

Thanks.


Problem displaying some chars - El Forum - 11-20-2010

[eluser]WanWizard[/eluser]
Check in the browser what the content type is (in Firefox, view Character Encoding).

If not utf-8, something is set otherwise. Check:
- if the content type in the HTML head meta tag is set to utf-8
- if needed, have CI send an http header with the utf8 content type as well.
- if it still fails, apache might force another charset. Set the Apache AddDefaultCharset to utf8

If it is utf-8, the php file might be saved in the wrong format. Set your editor to save files in utf-8 format, and if that's not possible, get yourself an editor that can.


Problem displaying some chars - El Forum - 11-20-2010

[eluser]Narkboy[/eluser]
If none of those work - did that text pass anywhere near to a Microsoft product of any kind?

Word et al. use CP1252 (I think? - one of the cp maps anyway) which has some points that go nowhere with UTF8 or, indeed, any sensible system of character encoding.

Might stop you tearing some hair out!

Smile


Problem displaying some chars - El Forum - 11-21-2010

[eluser]fatman[/eluser]
Thanks a lot, i changed the file saving type in the IDE and it worked Smile