Removing Byte Order Marks

Stefan Baumgartner

Stefan on Mastodon

More on PHP

One special version of Excel for instance still adds those nasty buggers.

$str = file_get_contents("input_file_with_bom.csv");

$str = str_replace("\xEF\xBB\xBF","",$str);


More articles on PHP

Stay up to date!

3-4 updates per month, no tracking, spam-free, hand-crafted. Our newsletter gives you links, updates on fettblog.eu, conference talks, coding soundtracks, and much more.