diff --git a/src/htsmsg_xml.c b/src/htsmsg_xml.c index d1ba7d5f..81ff53ca 100644 --- a/src/htsmsg_xml.c +++ b/src/htsmsg_xml.c @@ -833,6 +833,10 @@ htsmsg_xml_deserialize(char *src, char *errbuf, size_t errbufsize) xp.xp_encoding = XML_ENCODING_UTF8; LIST_INIT(&xp.xp_namespaces); + /* check for UTF-8 BOM */ + if(src[0] == 0xef && src[1] == 0xbb && src[2] == 0xbf) + memmove(src, src + 3, strlen(src) - 2); + if((src = htsmsg_parse_prolog(&xp, src)) == NULL) goto err;