Martin Probst's weblog

BOM of death

Thursday, August 4, 2005, 16:40 — 0 comments Edit

Note to self: next time you get really strange XML parse and comparison errors, try running this before looking at XML and Java files, cursing at XSLT, JUnit, Eclipse & the world in general for an hour:

find | grep -v .svn | xargs sed "s|\\xEF\\xBB\\xBF||" -i.from-bom

(Unix shell script to remove UTF-8 byte order marks from all files below the current directory).

Afterwards start cursing about Notepad, Windows, and Microsoft’s use of the BOM in general.


No comments.