diff --git a/journals/views.py b/journals/views.py index 98cf97424f20387805aebf48cec2686a7b2b683b..bef16dd3c712b189e2f506caa98792f668d545a1 100644 --- a/journals/views.py +++ b/journals/views.py @@ -751,7 +751,7 @@ def metadata_xml_deposit(request, doi_label, option='test'): # Then create the associated Deposit object (saving the metadata to a file) if option == 'deposit': - content = ContentFile(publication.metadata_xml.encode('ascii')) + content = ContentFile(publication.metadata_xml.encode('utf-8')) deposit = Deposit(publication=publication, timestamp=timestamp, doi_batch_id=doi_batch_id, metadata_xml=publication.metadata_xml, deposition_date=timezone.now()) deposit.metadata_xml_file.save(path, content)