sindresorhus/strip-bom — pull request #1 by mathiasbynens (2014-05-12 10:17:30+00:00)
Title: Test non-UTF-8-encoded files that contain EF BB BF

Byte sequences that look like a UTF-8-encoded BOM must only be stripped from UTF-8-encoded files. This patch makes sure we actually test if stripping non-UTF-8 files is successfully prevented.

I changed the UTF-16 test files so that they start with `0xEF 0xBB 0xBF`.

```bash
$ hexdump -C fixture-utf16be
00000000 ef bb bf 00 00 55 00 6e 00 69 00 63 00 6f 00 72 |.....U.n.i.c.o.r|
00000010 00 6e 00 0a |.n..|
00000014

$ hexdump -C fixture-utf16le
00000000 ef bb bf 00 55 00 6e 00 69 00 63 00 6f 00 72 00 |....U.n.i.c.o.r.|
00000010 6e 00 0a 00 |n...|
00000014
```