CodeIgniter Forums
Strange Characters appearing on web pages - Solution - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Strange Characters appearing on web pages - Solution (/thread-11373.html)



Strange Characters appearing on web pages - Solution - El Forum - 09-06-2008

[eluser]Jay Turley[/eluser]
They look a lot like this: 

After much research, the solution was to make sure all of my files, and I mean ALL of them were encoded as UTF-8 without BOM.

Hoping this helps someone else solve this easily.


Strange Characters appearing on web pages - Solution - El Forum - 09-06-2008

[eluser]charlie spider[/eluser]
if your data is being pulled from a database, make sure your encoding for the db and the tables matches that in your config file as well as your page encoding. I had a similiar problem that wouldn't go away until absolutely EVERYTHING was using UTF-8


Strange Characters appearing on web pages - Solution - El Forum - 09-08-2008

[eluser]Phil Sturgeon[/eluser]
You can use htmlspecialchars() to make sure characters are encoded properly too. Remember if a:

Code:
&

shows on a page instead of...

Code:
&

then it is not valid. Similar characters will show wrong in FF.


Strange Characters appearing on web pages - Solution - El Forum - 09-27-2008

[eluser]krif[/eluser]
Thanks so much, I had exactly the same problem.

The strange  characters showed up before an embedded load view and I had no clue where they came from.

One of my .php files was saved with ANSI encoding. Saving it again with UTF-8 solved this issue.


Strange Characters appearing on web pages - Solution - El Forum - 02-11-2009

[eluser]XORd[/eluser]
yes, but should all framework files be UTF-8 w/o BOM?
cuz i see they aren't....