diff --git a/src/calibre/gui2/store/loader.py b/src/calibre/gui2/store/loader.py index 0c1efe8479..6da3e4fa01 100644 --- a/src/calibre/gui2/store/loader.py +++ b/src/calibre/gui2/store/loader.py @@ -37,7 +37,7 @@ def download_updates(ver_map={}, server='https://code.calibre-ebook.com'): name = name.decode('utf-8') d = decompressobj() src = d.decompress(raw) - src = src.decode('utf-8') + src = src.decode('utf-8').lstrip(u'\ufeff') # Python complains if there is a coding declaration in a unicode string src = re.sub(r'^#.*coding\s*[:=]\s*([-\w.]+)', '#', src, flags=re.MULTILINE) # Translate newlines to \n diff --git a/src/calibre/gui2/store/stores/litres_plugin.py b/src/calibre/gui2/store/stores/litres_plugin.py index 0c59b7e0de..f2c4e0ad99 100644 --- a/src/calibre/gui2/store/stores/litres_plugin.py +++ b/src/calibre/gui2/store/stores/litres_plugin.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- +# -*- coding: utf-8 -*- from __future__ import (unicode_literals, division, absolute_import, print_function) store_version = 1 # Needed for dynamic plugin loading