Instead of using minidom.parseString with read_file, let's just use minidom.parse(filename) variant which handles encoding by itself.
-- You received this message because you are subscribed to the Google Groups "asciidoc" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/asciidoc?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
# HG changeset patch # User Stanislav Ochotnicky <[email protected]> # Date 1370336027 -7200 # Node ID 2763a041e498eb5d2cf47b275e618a61b9bf0198 # Parent 1ebcbfc71e2fab314438d0f63ec2b3f6ef007ffe Use standard minidom.parse instead of parseString with read_file diff --git a/a2x.py b/a2x.py --- a/a2x.py +++ b/a2x.py @@ -736,7 +736,7 @@ f = os.path.normpath(f) if f not in ['content.opf']: resource_files.append(f) - opf = xml.dom.minidom.parseString(read_file(opf_file)) + opf = xml.dom.minidom.parse(opf_file) manifest_files = [] manifest = opf.getElementsByTagName('manifest')[0] for el in manifest.getElementsByTagName('item'):
