Open sgniedoj opened 2 years ago
Adds "encoding" parameter to MailMerge.write
Calling MailMerge.write(file) occasionally causes lxml.etree.SerialisationError: IO_ENCODER exception. Adding encoding='UTF-8' to xml = etree.tostring(self.parts[zi].getroot(), encoding='UTF-8') eliminates the problem.
MailMerge.write(file)
lxml.etree.SerialisationError: IO_ENCODER
encoding='UTF-8'
xml = etree.tostring(self.parts[zi].getroot(), encoding='UTF-8')
Description
Adds "encoding" parameter to MailMerge.write
Motivation and Context
Calling
MailMerge.write(file)
occasionally causeslxml.etree.SerialisationError: IO_ENCODER
exception. Addingencoding='UTF-8'
toxml = etree.tostring(self.parts[zi].getroot(), encoding='UTF-8')
eliminates the problem.How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: