You are here

Strange invisible characters at begining of guide.xml

4 posts / 0 new
Last post
nirn
Offline
Donator
Joined: 3 years
Last seen: 1 year
Strange invisible characters at begining of guide.xml

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"?>.

mat8861
Offline
WG++ Team memberDonator
Joined: 8 years
Last seen: 2 hours

remove them with sed from the guide ?

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 8 years
Last seen: 2 hours

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...

nirn
Offline
Donator
Joined: 3 years
Last seen: 1 year

Thank you very much, I wasn’t aware of BOM.

I will exclude them,

Log in or register to post comments

Brought to you by Jan van Straaten

Program Development - Jan van Straaten ------- Web design - Francis De Paemeleere
Supported by: servercare.nl