Update lib/galaxy/managers/citations.py

change "utf-8" to apparent_encoding

Co-Authored-By: Marius van den Beek <m.vandenbeek@gmail.com>
This commit is contained in:
Oleg Zharkov
2020-02-13 16:57:46 +01:00
committed by GitHub
co-authored by Marius van den Beek
parent 055aca1cb9
commit fada553a8c
+2 -1
View File
@@ -47,7 +47,8 @@ class DoiCache(object):
doi_url = "https://doi.org/" + doi
headers = {'Accept': 'text/bibliography; style=bibtex, application/x-bibtex'}
req = requests.get(doi_url, headers=headers)
return req.content.decode("utf-8")
req.encoding = req.apparent_encoding
return req.text
def get_bibtex(self, doi):
createfunc = functools.partial(self._raw_get_bibtex, doi)