Forum Moderators: open

Message Too Old, No Replies

Phantom character in html, find and replace can't find it.

         

penstaar

4:57 am on Apr 9, 2009 (gmt 0)

10+ Year Member



Hi all,

When I open some html files in Dreamweaver, I see a crazy looking character in front of the <html> tag.

ÿþ<html><head>

I tried to do a batch Find and Replace, but unless the file was actually open, it couldn't find the ÿþ character and hence would not replace.

The funny thing also is that when I open the file in TextEdit, the ÿþ doesn't show up...

I really want to do a batch find and replace as there are a hundred or so files with contain this char. When viewed on a Vista laptop it displays some really weird stuff. Some browsers display fine.

Anyone know what da heck is happenin' mon?

encyclo

2:12 pm on Apr 9, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's a UTF-8 Byte-Order Mark (or BOM). I'm not an expert on Dreamweaver, but the editor may be able to remove it via an option. Otherwise you can try a different editor such as Notepad++ (there is an option to convert to UTF-8 without BOM, or convert to ANSI if you are using ISO-8859-1 encoding). The last resort is to use a hex editor to remove it.

The BOM is there to give an indication that the text file is UTF-8-encoded, but the BOM can be problematic on the web where encoding is defined primarily via a HTTP header or meta charset element.

CSS_Kidd

2:46 pm on Apr 9, 2009 (gmt 0)

10+ Year Member



Encyclo is right. There is a section in preferences to change options for BOM. However check the language option as well.