From 0673a25f875bc845a3aa2a03ac99bd3f49a0c046 Mon Sep 17 00:00:00 2001 From: Nicolas Demonte Date: Tue, 2 Apr 2019 14:48:43 +0200 Subject: [PATCH] Fix filename encoding error during document conversion #31911 --- src/pfwbged/basecontent/indexers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pfwbged/basecontent/indexers.py b/src/pfwbged/basecontent/indexers.py index 34a443d..1f74cdb 100644 --- a/src/pfwbged/basecontent/indexers.py +++ b/src/pfwbged/basecontent/indexers.py @@ -39,7 +39,7 @@ def document_dynamic_searchable_text_indexer(obj): try: datastream = transforms.convertTo( 'text/plain', child.file.data, mimetype=child.file.contentType, - filename=child.file.filename) + filename=unicode(child.file.filename, 'utf-8')) indexed_elements.append(unicode(datastream.getData(), 'utf-8', 'ignore')) except (ConflictError, KeyboardInterrupt):