Jump to content
Killersites Forums

 - BOM characters


Recommended Posts

I went to the old forum to read up on BOM, I followed the link and still don't understand how to resolve it. Can anybody please give me a quick selotion for BOM characters at the beginning of my web page please. It seems to me it is blocking any thing after it cause I'm sitting with a blank page in front of me!:o

 

I have read that people experience this problem if working with php, well I'm working with php if that can help.

 

thank you

Link to post
Share on other sites

originally I am using notelpad, but I got DWmx demo from a friend so that I can get the feel of it, and still it gave me BOM when I opened it in DW.

 

But I must add, in the mean while while waiting for a reply I went and opened my php & css in notepad and then resave them both under ANSI insted of UTF-8 and the BOM disappear. I then went back and change it back, and as sure as Hell, there they are again.

 

I have manage to get my content on css back on my page, cause I was on the wrong level in my link.

Link to post
Share on other sites

"The first step you will have to take is to give up Notepad. Notepad has a bug (OK, not strictly a bug, but a very undesireable feature). When saving as Unicode (utf-8), it adds a byte-order mark, which is a zero-width space used to indicate the file contents and whether UTF-16 is "little-endian" or "big-endian" (waaay off-topic for this post!). A BOM is not required in utf-8 and should never be used on the web. Notepad will break your utf-8 pages, sometimes to the extent that you will need a hex editor to fix them.

 

If you use a web-friendly text editor then just select utf-8 and save away. You may need to convert older files, and it is best to be consistent and save as utf-8 everywhere. Don't forget that one big advantage of utf-8 is that it is ASCII-compatible, so the transition is easy. "

http://www.webmasterworld.com/forum21/11759.htm

 

That seems to indicate that it is an issue with the way that Notepad saves files... though I can save as UTF-8 in Notepad and it seems to work fine for me, no BOM displays. Odd. The post is old though, so maybe it's no longer applicable.

 

I don't fully understand the difference between ANSI and UTF-8 myself... Basically, it seems like they are different character sets that allow you to save a range of characters, and UTF-8 is preferred, since it can store more characters. Someone may have to help me with me explanation here -- I checked Wikipedia but most of it is very technical and went over my head.

 

The point is, it sounds like UTF-8 is the way to go, maybe just don't use notepad to save the files. I wouldn't usually suggest using Notepad anyway, at least go with a text editor that has tabs and code highlighting and such.

Link to post
Share on other sites
  • 5 months later...

Notepad++ is the answer to all your BOM pains :)

 

For some reason, with Dreamweaver (and maybe other editors), the BOM (Byte Order Mark) is introduced when you have not asked it to be... and only on some pages. It's a bug. Problem is, the bug makes your page invalid to W3C standards. The DW validation tool won't pick this up

 

Download and install the free Notepad++.

http://notepad-plus.sourceforge.net/uk/site.htm

 

Whenever the W3C validator throws up the BOM error, just open up the file in Notepad++, click on the 'Format' option, tick 'encode in UTF-8 without BOM' and then save your file. The BOM is taken out and your page is valid again.

Link to post
Share on other sites
  • 10 months later...
Guest ashim

That seems to indicate that it is an issue with the way that Notepad saves files... though I can save as UTF-8 in Notepad and it seems to work fine for me, no BOM displays. Odd. The post is old though, so maybe it's no longer applicable.

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...