Commit 3337c7a37351fa78e301d9f7136e93a01e34ef39

Authored by Tien Nguyen
1 parent 3b59dfb4

changed reading mode in ooxml.XMLParser.iter_files() for single xml to rb. With…

… the 'r' mode, it's impossible to parse excel-xml 2003 and 2007
Showing 1 changed file with 1 additions and 1 deletions
oletools/ooxml.py
... ... @@ -428,7 +428,7 @@ class XmlParser(object):
428 428 if self.is_single_xml():
429 429 if args:
430 430 raise BadOOXML(self.filename, 'xml has no subfiles')
431   - with open(self.filename, 'r') as handle:
  431 + with open(self.filename, 'rb') as handle:
432 432 yield None, handle # the subfile=None is needed in iter_xml
433 433 self.did_iter_all = True
434 434 else:
... ...