If you’re seeing ï»¿ in your webpage then you must be feeling disgusted and desperately want to remove it.
In this blog, we’ll tell you the simplest way to remove ï»¿ sign and know why this particular thing appears despite not manually adding it.
Why ï»¿ problem arises?
Basically, ï»¿ mark is used at the beginning of a text file for which the format isn’t specified. If a file is in little endian format but its interpreted as big endian then this BOM mark would reverse it to help in correct interpretation. Also, BOM mark tells that a file is in UTF-8 format.
BOM mark(ï»¿) in UTF-8 files is interpreted it as U+FEFF which is a noncharacter and hence invisible. For other encodings, its visible as ï»¿ sign.
The problem arises when a text-editor (Notepad, NotePad++ or anything else) interpret the file with BOM mark in ISO-8859-1 or CP1252 not in UTF-8 encoding.
But, I haven’t added ï»¿ sign then why its there?
It doesn’t matter if you’ve added the mark or not because Microsoft’s default text editor i.e Notepad adds this ï»¿ BOM mark at the beginning of every text file. This file, when interpreted by php shows up that weird looking ï»¿ sign before executing the php code. Hence you see BOM mark in some webpages designed in php.
Basically there is no use of BOM mark in UTF-8 files but they are often used that creates problems.
How to remove ï»¿ mark from a file?
There is a simple way to get rid of this. Get a text editor, say Notepad++ and open our file in it. Click ‘Encoding’ tab at the top and change encoding to ‘Encode in UTF-8 without BOM’. Save your file and your BOM mark is removed. Problem solved!!!
To prevent such ï»¿ mark from appearing in your file, avoid Notepad to write programming codes. Rather use text-editors like Notepad++.