diff --git a/datapusher/jobs.py b/datapusher/jobs.py index 624b35c..a333855 100644 --- a/datapusher/jobs.py +++ b/datapusher/jobs.py @@ -678,6 +678,9 @@ def _push_to_datastore(task_id, input, dry_run=False, temp_dir=None): text=True, ) logger.info("Identified encoding of the file: {}".format(file_encoding.stdout)) + + # trim the encoding string + file_encoding.stdout = file_encoding.stdout.strip() # using iconv to re-encode in UTF-8 if file_encoding.stdout != "UTF-8":