rclpdf: encoding issue in attachment extract

This commit is contained in:
Jean-Francois Dockes 2022-08-15 17:44:43 +02:00
parent a72045e8a3
commit 225081563d

View File

@ -516,11 +516,13 @@ class PDFExtractor:
def extractone(self, ipath):
self.em.rclog("extractone: [%s]" % ipath)
#self.em.rclog("extractone: [%s]" % ipath)
if not self.attextractdone:
if not self.extractAttach():
return (False, "", "", rclexecm.RclExecM.eofnow)
path = os.path.join(tmpdir.getpath(), ipath.decode('utf-8'))
if type(ipath) != type(""):
ipath = ipath.decode('utf-8')
path = os.path.join(tmpdir.getpath(), ipath)
if os.path.isfile(path):
f = open(path, "rb")
docdata = f.read();