Skip to content

Commit

Permalink
fix xmllint_format by encoding as utf-8 and keeping fingers crossed t…
Browse files Browse the repository at this point in the history
…hat it will work in 27 34 and 36
  • Loading branch information
kba committed Jul 26, 2018
1 parent a9704aa commit e7cf5e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ocrd/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ def xmllint_format(xml):
from lxml import etree as ET
parser = ET.XMLParser(resolve_entities=False, strip_cdata=False, remove_blank_text=True)
document = ET.fromstring(xml, parser)
return '%s\n%s' % (
return ('%s\n%s' % (
'<?xml version="1.0" encoding="UTF-8"?>',
ET.tostring(document, pretty_print=True)
)
)).encode('utf-8')

def is_string(val):
# pylint: disable=undefined-variable
Expand Down

0 comments on commit e7cf5e5

Please sign in to comment.