you would use the following code to remove utf8 bom
//Remove UTF8 Bom
function remove_utf8_bom($text)
{
$bom = pack('H*','EFBBBF');
$text = preg_replace("/^$bom/", '', $text);
return $text;
}
More Related Contents:
- How can I output a UTF-8 CSV in PHP that Excel will read properly?
- How do I remove  from the beginning of a file?
- UTF-8 BOM signature in PHP files
- Reference: Why are my “special” Unicode characters encoded weird using json_encode?
- PHP DOMDocument loadHTML not encoding UTF-8 correctly
- SET NAMES utf8 in MySQL?
- preg_match and UTF-8 in PHP
- PHP: Replace umlauts with closest 7-bit ASCII equivalent in an UTF-8 string
- How to send UTF-8 email?
- How to avoid echoing character 65279 in php?
- Convert latin1 characters on a UTF8 table into UTF8
- PHP DOMDocument failing to handle utf-8 characters (☆)
- UTF-8 to Unicode Code Points
- Convert ASCII TO UTF-8 Encoding
- PHP replacing special characters like à->a, è->e
- Trim unicode whitespace in PHP 5.2
- dompdf character encoding UTF-8
- Is “SET CHARACTER SET utf8” necessary?
- How to handle user input of invalid UTF-8 characters
- PHP: using DOMDocument whenever I try to write UTF-8 it writes the hexadecimal notation of it
- TCPDF UTF-8 symbols not showing up
- php regex word boundary matching in utf-8
- Multi-byte safe wordwrap() function for UTF-8
- MongoDB PHP UTF-8 problems
- How to convert all characters to their html entity equivalent using PHP
- Ensuring valid UTF-8 in PHP
- UTF-8 not working in HTML forms
- Decoding numeric html entities via PHP
- Send emails with international accent and special characters
- Trim unicode whitespace in PHP