diff --git a/recipes/el_mercurio_chile.recipe b/recipes/el_mercurio_chile.recipe index cdb552fd1d..4db695e819 100644 --- a/recipes/el_mercurio_chile.recipe +++ b/recipes/el_mercurio_chile.recipe @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# -*- coding: latin-1 mode: python -*- +# -*- coding: utf-8 mode: python -*- __license__ = 'GPL v3' __copyright__ = '2009-2015, Darko Miletic ' diff --git a/recipes/politico.recipe b/recipes/politico.recipe index 15cba20878..440cf80f34 100644 --- a/recipes/politico.recipe +++ b/recipes/politico.recipe @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# -*- coding: cp1252 -*- +# -*- coding: utf-8 -*- __license__ = 'GPL v3' __copyright__ = '2009, Darko Miletic ' diff --git a/src/calibre/web/feeds/recipes/collection.py b/src/calibre/web/feeds/recipes/collection.py index 3a4cedf829..7be5d1dac1 100644 --- a/src/calibre/web/feeds/recipes/collection.py +++ b/src/calibre/web/feeds/recipes/collection.py @@ -221,6 +221,7 @@ def download_builtin_recipe(urn): import bz2 recipe_source = bz2.decompress(get_https_resource_securely( 'https://code.calibre-ebook.com/recipe-compressed/'+urn, headers={'CALIBRE-INSTALL-UUID':prefs['installation_uuid']})) + recipe_source = recipe_source.decode('utf-8') from calibre.web.feeds.recipes import compile_recipe recipe = compile_recipe(recipe_source) # ensure the downloaded recipe is at least compile-able if recipe is None: @@ -232,7 +233,7 @@ def download_builtin_recipe(urn): def get_builtin_recipe(urn): with zipfile.ZipFile(P('builtin_recipes.zip', allow_user_override=False), 'r') as zf: - return zf.read(urn+'.recipe') + return zf.read(urn+'.recipe').decode('utf-8') def get_builtin_recipe_by_title(title, log=None, download_recipe=False):