- How To Get Rid Of ï»¿ï»¿ï»¿ï»¿ï»¿ At The Beginning Of A File
this post will explain and show you with pictures how to get rid of the strange characters you are seeing on your files at the beginning , Last Updated: Sun Jun 14, 2020
Wed Dec 31, 1969
recently i was working on my website and i was debugging with firefox and firefly.. as i looked at my HTML code, i saw that i had some weird characters on all my pages that were generated by PHP. always at the start of every page it had ï»¿ï»¿ï»¿ï»¿ï»¿
the code looked like this:
ï»¿ï»¿ï»¿ï»¿ï»¿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
i looked at my code and i didnt have any white spaces or anything. i read some posts that said samething about UTF-8 encoding.. recently i purchased a copy of dreamweaver. the new version has a settings for file encoding:
finally i figured it out whats been going on. its this thing call BOM. as you can see from my snapshot it says:
default encoding: Unicode(UTF-8)
 use when opening existing files that don't specify an encoding
unicode normalization form: None
 Include unicode signature (BOM)
thats what you need to do, i make sure Include unicode signature (BOM) is checked.
so now that i know what caused the problem, how do i fix it.
well i found a simple fix. there is a free application for windows called Notepad++. google it and download it.
once you have it installed on your computer, open your PHP file with notepad++ at the top, you will see a menu, select Encoding.you will see the encoding options:
[x] Encode in ANSI
Encode in UTF-8 without BOM
Encode in UTF-8
Encode in UCS-2 Big Endian
Encode in UCS-2 Little Endian
Convert to ANSI
Convert to UTF-8 without BOM
Convert to UTF-8
Convert to UCS-2 Big Endian
Convert to UCS-2 Little Endian
Select 'Convert to UTF-8 without BOM' save the changes and reload your page where you are seeing the strange characters and you will not see them again.
how to get rid of ï»¿ï»¿ï»¿ï»¿ï»¿ at the beginning of a file