SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 8eaf2836 authored by Jean-Sébastien Caux's avatar Jean-Sébastien Caux
Browse files

Try another forced encoding

parent 64d26842
No related branches found
No related tags found
No related merge requests found
......@@ -767,8 +767,8 @@ def metadata_xml_deposit(request, doi_label, option='test'):
paper=publication.get_paper_nr(),
doi=publication.doi_label.replace('.', '_'),
timestamp=timestamp)
f = open(settings.MEDIA_ROOT + path_with_timestamp, 'w')
f.write(publication.metadata_xml.encode('utf8'))
f = open(settings.MEDIA_ROOT + path_with_timestamp, 'w', encoding='utf-8')
f.write(publication.metadata_xml)
f.close()
# Copy file
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment