diff --git a/openformats/formats/docx.py b/openformats/formats/docx.py index 9f20c465..faee4683 100644 --- a/openformats/formats/docx.py +++ b/openformats/formats/docx.py @@ -127,6 +127,10 @@ def get_document(self): with io.open(self.__document_path, 'r') as f: self.__document = f.read() + if self.__document.startswith("\ufeff"): + # Remove BOM + self.__document = self.__document.replace("\ufeff", "") + return self.__document def set_document(self, document):