diff --git a/htmldocx/h2d.py b/htmldocx/h2d.py index 6a0e113..203733d 100644 --- a/htmldocx/h2d.py +++ b/htmldocx/h2d.py @@ -620,8 +620,8 @@ def add_html_to_cell(self, html, cell): if not self.doc.paragraphs: self.doc.add_paragraph('') - def parse_html_file(self, filename_html, filename_docx=None): - with open(filename_html, 'r') as infile: + def parse_html_file(self, filename_html, filename_docx=None, encoding='utf-8'): + with open(filename_html, 'r', encoding=encoding) as infile: html = infile.read() self.set_initial_attrs() self.run_process(html) diff --git a/requirements.txt b/requirements.txt index 9cd179e..07c7ea8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ beautifulsoup4==4.8.0 -python-docx==0.8.10 +python-docx==0.8.11