FIX: Null character replaced by blank

-The presence of the character '\0' was causing an error with some PDFs.
-It has been fixed by replacing all occurences of '\0' with ''.
pull/106/head
ganeshtata 2017-11-08 12:50:50 +05:30
parent d4118cf5e8
commit 1b88575e79
1 changed files with 1 additions and 0 deletions

View File

@ -230,6 +230,7 @@ class CMapDB(object):
@classmethod @classmethod
def _load_data(klass, name): def _load_data(klass, name):
name = name.replace("\0", "")
filename = '%s.pickle.gz' % name filename = '%s.pickle.gz' % name
log.info('loading: %r', name) log.info('loading: %r', name)
cmap_paths = (os.environ.get('CMAP_PATH', '/usr/share/pdfminer/'), cmap_paths = (os.environ.get('CMAP_PATH', '/usr/share/pdfminer/'),