real_illusions Posted March 4, 2008 Share Posted March 4, 2008 I am trying to validate a webpage, however, something i've never seen before has cropepd up.The w3c validator is saying the following"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."The top of the page is<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head>I have removed the keywords, stylesheet and description (as they're not important in this).Anyway, I use the same charst-utf-8 on my site, and that validates fine, no warnings about the BOM. I cant made head or tail out of the wiki pages about the BOM, and i cant seem to find much info on why this error occurs. Anyone got any ideas? Link to comment Share on other sites More sharing options...
boen_robot Posted March 4, 2008 Share Posted March 4, 2008 It's not a coding issue. It's an encoding issue. Notepad places a BOM in the files you save in it as UTF-8. Other editors have an option on whether to place it or not.I think the idea behind BOM is to render the characters "" in user agents that are not using UTF-8, but are instead using another ASCII encoding. If you see those characters in Firefox, Opera, or another browser, it means the server is not serving the page as UTF-8, and so you need to make adjustments.The validator is warning you about this, because if this character appears, it could totally mess up your layout, hence you're probably not expecting your layout to be working with a "" at the top. Link to comment Share on other sites More sharing options...
Synook Posted March 5, 2008 Share Posted March 5, 2008 http://en.wikipedia.org/wiki/Byte_order_mark Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.