diff --git a/modules/validation/xml_validator.py b/modules/validation/xml_validator.py
index ab6cd0a..3207088 100644
--- a/modules/validation/xml_validator.py
+++ b/modules/validation/xml_validator.py
@@ -20,7 +20,7 @@ def validate(self, doc, doc_name, doc_corpus):
schema = self.schema
command = "xmllint --schema schemas/" + schema + " tempfilename"
- out, err = exec_via_temp(doc, command)
+ out, err = exec_via_temp(doc.encode("utf-8"), command)
err = err.strip()
err = err.replace("
","").replace("\n","").replace('