You’re compiling HTML (4 or 5) code and think everything is fine and dandy — until you upload the code and suddenly see weird characters like “ï»¿” in the browser. What happened?
This typically occurs when copying from Microsoft Word to an editor like Dreamweaver. (A more thorough explanation can be found here: How do I remove ï»¿ from the beginning of a file?)
This is the typical sequence we follow when copying and pasting from Word:
Create all of your code (HTML, PHP, etc.)
Copy all of the code (CMD + A or CTRL + A) then (CMD + C or CTRL + C)
Paste all of your code into Textwrangler (CMD + V)
Select all of your code (CMD + A)
Click “Text” at the top
Click “Zap Gremlins…”
The normal options pop up; just click “Zap”
Step 9 (for good measure):
Click “Text” again and click “Straighten Quotes”
Copy all of your code again (CMD + C)
Paste code back into editor (CMD + V). FINISHED!
Paste all of your code into Textwrangler (CTRL + V)
Select all of your code (CTRL + A)
Click “Encoding” at the top
Click “Convert to UTF-8 without BOM”
Copy all of your code again (CTRL + C)
Paste code back into editor (CTRL + V). FINISHED!