Hello,
I'm writing some custom xmltv parser and spotted some strange thing. At the beginning of generated guide.xml there re 3 invisible characters with hex code 0xef 0xbb 0xbf, so my question it is bug or feature or can I somehow disable this "feature" ?:)
This what I'm talking about:
00000000 ef bb bf 3c 3f 78 6d 6c 20 76 65 72 73 69 6f 6e |...<?xml version|
00000010 3d 22 31 2e 30 22 20 65 6e 63 6f 64 69 6e 67 3d |="1.0" encoding=|
00000020 22 55 54 46 2d 38 22 3f 3e 0a 3c 74 76 20 67 65 |"UTF-8"?>.
remove them with sed from the guide ?
this is the BOM
https://en.wikipedia.org/wiki/Byte_order_mark
so as matt said exclude them when you parse it.
maybe whatever your using to parse has a switch to exclude it?
javascript for example..
https://stackoverflow.com/questions/27136230/how-to-exclude-bom-with-bom...
or with sed as matt said
https://unix.stackexchange.com/questions/381230/how-can-i-remove-the-bom...
surely there must be a way to parse with it there as most files have it...
Thank you very much, I wasn’t aware of BOM.
I will exclude them,