Remove  sign problem from webpages (php)

  1. Previous
  2. Next
  3. Recent

    1. Signs 'He' May be Cheating on You
    2. 7 Vows of Hindu Marriage - Know What 'Saat Vachans' Mean
    3. RuPay vs Visa vs Mastercard vs American Express- A Comparison
    4. What is RuPay? Everything You Need to Know About India's Domestic Payment System!
    5. Top 10 Online Portals to Find a High Paying Job in India
    6. Top Indians who Revolutionized the IT Sector in India
    7. 8 Initiatives by Narendra Modi that Could Change the Future of the Nation
    8. 8 Work-from-home Jobs for Housewives, Students, and Part timers
    9. Complete Company Registration Process in India - Explained
    10. Change Name in India in 5 Steps - Filing Affidavit, Newspaper Ad & Gazette Notification

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!!!

encode in utf-8 without BOM to remove BOM sign

To prevent such  mark from appearing in your file, avoid Notepad to write programming codes. Rather use text-editors like Notepad++.

blog comments powered by Disqus