Knowledgebase
Free PHP Scripts > Knowledgebase > Knowledgebase

Search help:


How to remove UTF-8 BOM (byte order mark) from a file?

Solution

The byte order mark (BOM) is a Unicode character that sometimes causes problems in PHP scripts (especially in includes), because it can cause HTTP headers to be sent to the browser prematurely.

To make sure your PHP files do not have the BOM, follow these steps:

  1. Download and install this powerful free text editor: Notepad++
     
  2. Open the file you want to verify/fix in Notepad++
     
  3. In the top menu select Encoding > Convert to UTF-8 (option without BOM)
     
  4. Save the file

 

That's it, you should now have a valid file in UTF-8 encoding without the byte order mark.

 
Was this article helpful? yes / no
Related articles How to convert files to UTF-8
The anti-SPAM image (captcha) doesn't show
How do I translate LinkMan?
Article details
Article ID: 40
Category: General FAQ
Rating (Votes): Article rated 3.4/5.0 (5)

 
« Go back

 
Powered by Help Desk Software HESK, brought to you by SysAid