Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Why Doesn't This Page Validate?

Why Doesn't This Page Validate?
Thread Tools
Forum Regular
Join Date: Apr 2003
Location: Toronto, Canada
Status: Offline
Reply With Quote
Sep 13, 2005, 11:18 AM
 
I'm too young to pull out all my hair. Could someone please tell me why this site does not validate:

http://www.benlewis.ca

It keeps on telling me that:

"The character encoding specified in the HTTP header (macintosh) is different from the value in the <meta> element (utf-8)."

I never specify the encoding as being "macintosh" in the header. And according to TextEdit and Smultron it is a UTF-8 document and that is the information I display in the meta tag.

Thanks in advance to anyone who can lend their assistance.
     
Dedicated MacNNer
Join Date: Nov 2001
Location: Are Eye
Status: Offline
Reply With Quote
Sep 14, 2005, 08:47 AM
 
The server itself is sending out an http header that is probably not utf-8. I'm thinking you're serving the page from a home machine, but here are the http headers:

Response Headers - http://www.benlewis.ca/

Date: Wed, 14 Sep 2005 13:46:40 GMT
Server: Apache/1.3.33 (Darwin) PHP/5.0.4
X-Powered-By: PHP/5.0.4
Keep-Alive: timeout=15, max=99
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=macintosh

200 OK
     
Forum Regular
Join Date: Apr 2003
Location: Toronto, Canada
Status: Offline
Reply With Quote
Sep 14, 2005, 04:00 PM
 
How would I go about changing that information?
     
Grizzled Veteran
Join Date: Oct 2003
Status: Offline
Reply With Quote
Sep 14, 2005, 04:13 PM
 
If the server supports .htaccess modifications, you can add this to a .htaccess file in the site's web root:

Code:
AddCharset UTF-8 .txt .html .htm .php
(adding extensions as needed)
The only thing necessary for evil to flourish is for good men to do nothing
- Edmund Burke
     
Forum Regular
Join Date: Apr 2003
Location: Toronto, Canada
Status: Offline
Reply With Quote
Sep 14, 2005, 04:22 PM
 
Nevermind, I figured it out. The line:

Code:
AddDefaultCharset macintosh
had been part of a config file I had copied off of someone else in order to enable virtual hosting on my machine.

Seems to validate fine now.

Thanks a lot for the detective work registered_user!
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 07:36 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2