Jump to content
Killersites Forums

validating xhtml


Recommended Posts

I have a php site which validates on every page except one which carries a warning. The head is a php include so all pages have the same code. I realise this is not a problem but I would like an opinion as to why this may be happening. www. sites4eyes .co .uk is the site that validates and www. sites4eyes .co .uk/portfolio.php is the page that carries the warning.

Link to post
Share on other sites

The warning "Byte-Order Mark found in UTF-8 File" in www. sites4eyes .co .uk/portfolio.php is because it has been saved with the encoding utf-8 instead of encoding ANSI.

 

I've just checked that it was saved like that by saving your php file and opening it in Notepad and then using Save As and looking at the encoding box in teh save window.

Link to post
Share on other sites

It is usual to use encoding ANSI when saving any html or php file.

 

The byte order mark can sometimes be seen at the very top left corner of the screen, it's a funny symbol that doesn't do any harm, but may lower everything by one row.

 

Coding utf-8 should be done in the meta tag for charset, like:-

<meta http-equiv="content-type" content="text/html; charset=utf-8"/>

Link to post
Share on other sites

It is usual to use encoding ANSI when saving any html or php file.

 

The byte order mark can sometimes be seen at the very top left corner of the screen, it's a funny symbol that doesn't do any harm, but may lower everything by one row.

 

Coding utf-8 should be done in the meta tag for charset, like:-

<meta http-equiv="content-type" content="text/html; charset=utf-8"/>

 

I had better start again. The met tag is identical to the one you suggested.

All pages on the site are identical except for the title in the head section.

All pages except the portfolio page validate. The portfolio page validates with a warning.

I just wondered why.

Link to post
Share on other sites

The reason for the warning "Byte-Order Mark found in UTF-8 File" is definitely because the second website www. sites4eyes .co .uk/portfolio.php has been saved with encoding utf-8 while the first www. sites4eyes .co .uk has been saved with encoding ANSI, I've checked both. It's nothing to do with the .php extension.

 

When you save the file (using Notepad in my case), use Save As and you should see boxes for File name, Save as Type and also encoding, before the Save and Cancel buttons. Change to ANSI.

Link to post
Share on other sites

The reason for the warning "Byte-Order Mark found in UTF-8 File" is definitely because the second website www. sites4eyes .co .uk/portfolio.php has been saved with encoding utf-8 while the first www. sites4eyes .co .uk has been saved with encoding ANSI, I've checked both. It's nothing to do with the .php extension.

 

When you save the file (using Notepad in my case), use Save As and you should see boxes for File name, Save as Type and also encoding, before the Save and Cancel buttons. Change to ANSI.

Thank you for your help. I use dreamweaver to edit files not notebook. I edited in notebook and followed your instruction but nothing changed. I suspect the browser didnt refresh. Then I noticed when saving this file in dream weaver the following box was ticked non of the other pages had this. Include unicode signature (BOM). I unticked this and saved. Still nothing changed so I deleted the file from the server and opened a new file and rewrote the code uploaded and everything is fine.

Your advice has certainly made me check in future before I press save.

Thanks again

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...