Posts Tagged ‘Hidden characters’

Hidden characters in Expression Web files

Monday, October 15th, 2007

I tried a few times to install wordpress on my domain - elgincomputerguy.com. I kept getting weird errors. I’d clear the database and start again, but the same thing kept happening.

I finally went to the support forums and found other people having the same problem and one of the suggested answers said that the file must start with “<?php” - any blank lines or spaces will mess it up. That’s when I remembered that I’d edited the file with Microsoft Expression Web and it adds some kind of weird characters at the beginning of every file.

I just found out about that weirdness within Expression Web a couple of months ago. Here’s what the file looked like in notepad:

NotepadHere's how it looks in Notepad

and here’s how it looks when I go to the DOS prompt and use “edit”:

EDIT

Isn’t that weird? I love Expression Web - I switched from Dreamweaver several months ago, but this odd behavior makes me have second thoughts. This is the second time it bit me - both times while I was doing PHP. You’d think I would have caught it sooner!

Notice that Notepad doesn’t display the hidden characters. If you create the file in Notepad, they’re not there, but if you do it in Expression Web then open in Notepad, they won’t show, but if you modify the file in Notepad and save it - the hidden characters remain. The only way I know of to get rid of them once they’re in a file is to use the DOS prompt and EDIT.