Jump to content

Passed validation, 2 warnings


40043mo

Recommended Posts

I'm fed up with getting these warnings. :wub: I have tried numerous ways to make them go away. :) The main problem is -I don't seem to understand what they are trying to tell me. :mellow: First Warning: Byte-Order Mark found in UTF-8 File.The Unicode Byte-Order Mark (BOM) in UTF-8 encoded files is known to cause problems for some text editors and older browsers. You may want to consider avoiding its use until it is better supported. 2nd Warning:Conflict between Mime Type and Document TypeThe document is being served with the text/html Mime Type which is not a registered media type for the XHTML 1.1 Document Type. The recommended media type for this document is: application/xhtml+xmlUsing a wrong media type for a certain document type may confuse the validator and other user agents with respect to the nature of the document, and you may get some erroneous validation errors. How to fix this problem? One of the following techniques should help:Here is my DTD and related errata:<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>My index.html Page</title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />What might I try next? Thanks for looking! :)

Link to comment
Share on other sites

Well for the second one, XHTML 1.1 documents have to have the MIME type application/xhtml-xml (not text/html as by your meta tag). However, IE doesn't recognise the application/xhtml-xml MIME type, and asks you download the file. So... you can't use XHTML 1.1 with IE (yet).Don't know about the first problem...

Link to comment
Share on other sites

For the first, you should save the file as UTF-8 encoded. File encoding specifies what characters can occur within the file. For example, the Cyrilic "д" is not valid in ISO-8859-1 as far as I'm aware, but is allowed in windows-1251. UTF-8 allows both all Cyrilic, all Latin and many other characters, most of which may not be supported in either encodings.UTF-8 however is a very special encoding in that a file that is encoded as UTF-8 may contain the so called "byte order mark" at the beggining of the file. I'm not aware exactly as to what is it supposed to do, but because UTF-8 may or may not have this mark, user agents that can't read that mark mess up the file, thus rendering some special characters in an odd way. Not using BOM eliminates this problem.

Link to comment
Share on other sites

For the first, you should save the file as UTF-8 encoded. File encoding specifies what characters can occur within the file. For example, the Cyrilic "д" is not valid in ISO-8859-1 as far as I'm aware, but is allowed in windows-1251. UTF-8 allows both all Cyrilic, all Latin and many other characters, most of which may not be supported in either encodings.UTF-8 however is a very special encoding in that a file that is encoded as UTF-8 may contain the so called "byte order mark" at the beggining of the file. I'm not aware exactly as to what is it supposed to do, but because UTF-8 may or may not have this mark, user agents that can't read that mark mess up the file, thus rendering some special characters in an odd way. Not using BOM eliminates this problem.
I was getting a fatal error message th other day trying to access the forums. I sure am glad to see that whatever washosed is dry now.Thanks boen-robot! I finally figured out it was telling me the ISO spec wasn't valid. That warning went away when I changed 'charset=' to UTF-8. Now I need to figure out how to disable BOM in a UTF-8 file!Synook,Yep! If I would just read the info the validator is giving me a little closer. I changed my file extension to .xhtml. Noproblem in Firefox, but IE7 just doesn't get it.Thanks again, y'all!
Link to comment
Share on other sites

I was getting a fatal error message th other day trying to access the forums. I sure am glad to see that whatever washosed is dry now.Thanks boen-robot! I finally figured out it was telling me the ISO spec wasn't valid. That warning went away when I changed 'charset=' to UTF-8. Now I need to figure out how to disable BOM in a UTF-8 file!Synook,Yep! If I would just read the info the validator is giving me a little closer. I changed my file extension to .xhtml. Noproblem in Firefox, but IE7 just doesn't get it.Thanks again, y'all!
I think Notepad saves UTF-8 files with BOM and there's no way to disable it from there. You need to open the file, and resave it as UTF-8 without BOM by using another editor. I know Dreamwaver supports it. Not sure about others.In Dreamwaver, after you have saved the file as UTF-8 with BOM, open the file and then click "Save As...". Uncheck the "Include Unicode Signature (BOM)" at the very bottom of the save box, and then click "Save", replacing the old file. And before you ask, I don't know what those normalization forms do.
Link to comment
Share on other sites

Archived

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

×
×
  • Create New...