]> git.ipfire.org Git - thirdparty/python-drafthorse.git/commitdiff
Fix missing UTF-8 header
authorRaphael Michel <mail@raphaelmichel.de>
Thu, 25 Oct 2018 23:24:02 +0000 (01:24 +0200)
committerRaphael Michel <mail@raphaelmichel.de>
Thu, 25 Oct 2018 23:24:02 +0000 (01:24 +0200)
drafthorse/utils.py

index 9bf8aa36252977d07e74bcf2c84382ad2412e1ba..299e14d89ab8e933ee0f4c3b87e51f4a9076eaec 100644 (file)
@@ -36,4 +36,4 @@ def validate_xml(xmlout, schema):
     schema = etree.XMLSchema(file=os.path.join(os.path.dirname(__file__), 'schema', schema + '.xsd'))
     parser = etree.XMLParser(schema=schema)
     xml_root = etree.fromstring(xmlout, parser)
-    return etree.tostring(xml_root, pretty_print=True)
+    return b"<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + etree.tostring(xml_root, pretty_print=True)