13 replies [Last post]
babrees
babrees's picture
Offline
Enthusiast
England,UK
Last seen: 13 years 21 weeks ago
England,UK
Joined: 2007-07-25
Posts: 63
Points: 0

I admit that after reading about them I still can't get my head round them.

I have a site that validates 100% http://www.tokrawebdesign.co.uk/

I am building another site (http://www.homeandgardenworld.co.uk/) that is based on those exact same templates and css file. This site validates BUT has a warning:

Character Encoding mismatch!

The character encoding specified in the HTTP header (utf-8) is different from the value in the element (iso-8859-1). I will use the value from the HTTP header (utf-8) for this validation.

My header is:

Welcome to Home and Garden World



-------
Jill

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 39 weeks 6 days ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

Both documents' meta data

Both documents' meta data declare iso-8859-1, which is fine, except the second is on a different server whose response header specifies utf-8. The server header trumps document meta data, so the validator knows it should be utf-8 but the document says otherwise; thus, the error.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

babrees
babrees's picture
Offline
Enthusiast
England,UK
Last seen: 13 years 21 weeks ago
England,UK
Joined: 2007-07-25
Posts: 63
Points: 0

kk5st wrote:Both documents'

kk5st wrote:
Both documents' meta data declare iso-8859-1, which is fine, except the second is on a different server whose response header specifies utf-8. The server header trumps document meta data, so the validator knows it should be utf-8 but the document says otherwise; thus, the error.

cheers,

gary

Thanks Gary, BUT they are both on the SAME server

Jill

-------
Jill

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 7 years 8 weeks ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

Are you using some sort of

Are you using some sort of CMS to run these two sites? Maybe there's a setting that controls PHP header output that's different between them.

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference

babrees
babrees's picture
Offline
Enthusiast
England,UK
Last seen: 13 years 21 weeks ago
England,UK
Joined: 2007-07-25
Posts: 63
Points: 0

It's not actually a CMS

It's not actually a CMS script (WSN Links) but it is so flexible that I do use it as such really. The script is set up identically on both sites. It is template driven and headers are identical. Apart from the templates there is a section where I can add meta tags, but, again, they are identical for both sites.

-------
Jill

babrees
babrees's picture
Offline
Enthusiast
England,UK
Last seen: 13 years 21 weeks ago
England,UK
Joined: 2007-07-25
Posts: 63
Points: 0

Before I take the whole

Before I take the whole thing down and start from scratch (which I REALLY don't want to do!), what can dictate the Character Encoding?

-------
Jill

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 6 years 47 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

But it appears that your

But it appears that your headers/meta tags are not the same as Gary has pointed out. How are you sure that the server headers are the same between these two servers?

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

babrees
babrees's picture
Offline
Enthusiast
England,UK
Last seen: 13 years 21 weeks ago
England,UK
Joined: 2007-07-25
Posts: 63
Points: 0

Hugo wrote:But it appears

Hugo wrote:
But it appears that your headers/meta tags are not the same as Gary has pointed out. How are you sure that the server headers are the same between these two servers?

The templates' headers/meta tags ARE identical. I took the template from tokra web design and copied it to home and garden. Sure, I moved some fields around in the body in order to get the different layout, but the HEADER is identical. The following is my template header. Obviously the database completes the fields.

Welcome to {SITETITLE}{PAGETITLE}



{MAINMETA}
{CATHEADERINFO}

Both domains are ON THE SAME SERVER. I have a reseller account and I set them both up myself, in EXACTLY the same way.

I have other sites, same server, same script and they do not have this problem either.

Which is why I am thinking start afresh - don't just delete the files and database but delete the actual account on the server and make a new one.

-------
Jill

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 39 weeks 6 days ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

If you're not adding

If you're not adding specific headers via PHP, you have one virtual host configured (at least) slightly differently from the other.

Here are the headers I see:

Response Headers - http://www.tokrawebdesign.co.uk/

Date: Fri, 09 Nov 2007 16:34:56 GMT
Server: Apache/1.3.37 (Unix) mod_fastcgi/2.4.2 mod_gzip/1.3.26.1a mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a PHP-CGI/0.1b
P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE" policyref="www.somesite.com/w3c/p3p.xml"
X-Powered-By: PHP/4.4.6
Set-Cookie: returnto=http%3A%2F%2Fwww.tokrawebdesign.co.uk%2Findex.php; path=/
Keep-Alive: timeout=8, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=ISO-8859-1

200 OK

Response Headers - http://www.homeandgardenworld.co.uk/

Date: Fri, 09 Nov 2007 16:35:15 GMT
Server: Apache/1.3.37 (Unix) mod_fastcgi/2.4.2 mod_gzip/1.3.26.1a mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a PHP-CGI/0.1b
P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE" policyref="www.somesite.com/w3c/p3p.xml"
X-Powered-By: PHP/4.4.6
Set-Cookie: returnto=http%3A%2F%2Fwww.homeandgardenworld.co.uk%2Findex.php; path=/
Keep-Alive: timeout=8, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=utf-8

200 OK

A simple test would be to put a small, static html page on each domain, and view the response headers. If they're different, it's an Apache virtual host configuration issue; the same, and it's a scripting issue.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

babrees
babrees's picture
Offline
Enthusiast
England,UK
Last seen: 13 years 21 weeks ago
England,UK
Joined: 2007-07-25
Posts: 63
Points: 0

Thanks Gary, Could you

Thanks Gary, Could you please tell a poor dumb blonde how to view the response headers. :blushing:

-------
Jill

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 39 weeks 6 days ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

babrees wrote:Thanks Gary,

babrees wrote:
Thanks Gary, Could you please tell a poor dumb blonde how to view the response headers. :blushing:
Purchase and apply Clairol's brunette hair coloring—guaranteed to raise the IQ 10+ points. Laughing out loud

OTOH, if you want to continue having more fun …

In Firefox's webdeveloper suite extension, select Information⇒View Response Headers.

In Lynx, type ] (the right square bracket). You will be asked whether you want the the header for the current document or for the currently selected link. Type d for the document, l for the link or c for cancel.

Use wget with the -S option, eg. from the command line,
wget -S --spider http://somewhere.com/The --spider option is so wget won't download and save the document. The -S option gets the server header.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

babrees
babrees's picture
Offline
Enthusiast
England,UK
Last seen: 13 years 21 weeks ago
England,UK
Joined: 2007-07-25
Posts: 63
Points: 0

kk5st wrote:Purchase and

kk5st wrote:
Purchase and apply Clairol's brunette hair coloring—guaranteed to raise the IQ 10+ points. Laughing out loud

OTOH, if you want to continue having more fun …

LOL! ok - I'll keep having fun and try the later way. But tomorrow now as it's late here and I'm off to bed

-------
Jill

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 6 years 47 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Jill no need to shout I

Jill no need to shout Smile I asked how you new as I wanted to establish whether you understood what a server response header was, this was obviously one of those issues where there CLEARLY WAS a difference despite protestations to the contrary. often one thinks that something is the same but empirical evidence clearly states otherwise.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

babrees
babrees's picture
Offline
Enthusiast
England,UK
Last seen: 13 years 21 weeks ago
England,UK
Joined: 2007-07-25
Posts: 63
Points: 0

Sorry for shouting Hugo,

Sorry for shouting Hugo, didn't mean it that way Smile

Thanks for you help folks. Rather than keep spending precious time looking for the proverbial needle, I decided I had spent enough time looking and it would be quicker for me to start from scratch. So I deleted the account on the server, recreated and, voila! It's validated ok now. :thumbsup:

-------
Jill