Jump to content

strabge characters appearing


ldoozer

Recommended Posts

I am using a template based site using php and on each page of my website the following characters  appear.

 

This is one example of when i view the source:

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

I have searched through all my source code to check these character are not present so not sure how they are getting there... Any ideas anyone?

Link to comment
https://forums.phpfreaks.com/topic/59602-strabge-characters-appearing/
Share on other sites

I would guess that firefox strictly interprets your web server's declared character set, but IE recognizes the BOM and handles it.

 

My gut feeling is that your webserver is set to add the UTF8 BOM to each page, but it declares the content-type as utf8 without BOM in the headers.  I'm not sure of the details of fixing that.

 

It's also possible PHP is adding it.. has your php installation been customized for anything to do with character sets?

Here's an idea .. install the "live http headers" firefox extension (google will find it for you) and see what it finds in the headers.  It may even be setting them to iso-8859-1.  You might be able to work around the problem by sending your own headers from php to override them, like

 

header('Content-type: text/html; charset=UTF-8');

 

The other thing is to check any meta http-equiv tags that set charset.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.