Fixing encode/decode issues for python3.

This commit is contained in:
arbisoft
2019-08-21 12:51:46 +05:00
parent b351c5e6c0
commit a680f01aa2

View File

@@ -69,7 +69,7 @@ def parse_lt_objects(lt_objects):
for lt_object in lt_objects:
if isinstance(lt_object, LTTextBox) or isinstance(lt_object, LTTextLine):
# text
text_content.append(lt_object.get_text().encode('utf-8'))
text_content.append(lt_object.get_text())
elif isinstance(lt_object, LTFigure):
# LTFigure objects are containers for other LT* objects, so recurse through the children
text_content.append(parse_lt_objects(lt_object._objs)) # pylint: disable=protected-access