linux uconv

Really nice convert to explain what characters are being used in Unicode Output

uconv -x name <file>

Also to generate Unicode

uconv -x hex

BOM

The U+FEFF character is encoded in UTF-8 over 3 bytes: ef bb bf.

xxd or hexdump shows you the byte content, so those 3 bytes, not the character that those 3 bytes encode like vim -b does.

To remove that BOM (which doesn't make sense in UTF-8) and fix other idiosyncrasies of Microsoft text files (which is likely the source of your problem), you can use dos2unix.

$ printf '\ufefffoobar\r\n' | hd
00000000  ef bb bf 66 6f 6f 62 61  72 0d 0a                 |...foobar..|
0000000b
$ printf '\ufefffoobar\r\n' | uconv -x name
\N{ZERO WIDTH NO-BREAK SPACE}\N{LATIN SMALL LETTER F}\N{LATIN SMALL LETTER O}\N{LATIN SMALL LETTER O}\N{LATIN SMALL LETTER B}\N{LATIN SMALL LETTER A}\N{LATIN SMALL LETTER R}\N{<control-000D>}\N{<control-000A>}
$ printf '\ufefffoobar\r\n' | uconv -x hex
\uFEFF\u0066\u006F\u006F\u0062\u0061\u0072\u000D\u000A
$ printf '\ufefffoobar\r\n' | dos2unix | hd
00000000  66 6f 6f 62 61 72 0a                              |foobar.|
00000007