April, 2019Archive for

Detecting UTF BOM using PHP

You need to detect the three bytes and remove the BOM. Below is a simplified example on how to detect and remove the three bytes. Here is a script to recursively check php files for BOM (ByteOrderMark)