From 7cb1e04135a93c52e77e3dc6788777d3b0476ddd Mon Sep 17 00:00:00 2001
From: Jorran de Wit <jorrandewit@outlook.com>
Date: Wed, 17 Jan 2018 22:07:47 +0100
Subject: [PATCH] Fix ASCII coding

---
 journals/views.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/journals/views.py b/journals/views.py
index 98cf97424..bef16dd3c 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)
-- 
GitLab