Help Desk Software

How do I save file in UTF-8 without BOM

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.

Help Desk Software