rclpdf: encoding issue in attachment extract
This commit is contained in:
parent
a72045e8a3
commit
225081563d
@ -516,11 +516,13 @@ class PDFExtractor:
|
|||||||
|
|
||||||
|
|
||||||
def extractone(self, ipath):
|
def extractone(self, ipath):
|
||||||
self.em.rclog("extractone: [%s]" % ipath)
|
#self.em.rclog("extractone: [%s]" % ipath)
|
||||||
if not self.attextractdone:
|
if not self.attextractdone:
|
||||||
if not self.extractAttach():
|
if not self.extractAttach():
|
||||||
return (False, "", "", rclexecm.RclExecM.eofnow)
|
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):
|
if os.path.isfile(path):
|
||||||
f = open(path, "rb")
|
f = open(path, "rb")
|
||||||
docdata = f.read();
|
docdata = f.read();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user