From d42915a1ca9f795ac15a561f8dcc57bfa9f8db29 Mon Sep 17 00:00:00 2001 From: Simon Conseil Date: Sun, 23 Nov 2014 15:53:09 +0100 Subject: [PATCH] Fix the title which was not unicode when using the settings file (fix #104). --- sigal/settings.py | 3 +++ tests/sample/sigal.conf.py | 1 + 2 files changed, 4 insertions(+) diff --git a/sigal/settings.py b/sigal/settings.py index 5c53270..b47edc1 100644 --- a/sigal/settings.py +++ b/sigal/settings.py @@ -141,6 +141,9 @@ def read_settings(filename=None): if PY2 and isinstance(settings[p], str): settings[p] = settings[p].decode(enc) + if settings['title']: + settings['title'] = settings['title'].decode('utf8') + for key in ('img_size', 'thumb_size', 'video_size'): w, h = settings[key] if h > w: diff --git a/tests/sample/sigal.conf.py b/tests/sample/sigal.conf.py index e693f83..6b27942 100644 --- a/tests/sample/sigal.conf.py +++ b/tests/sample/sigal.conf.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- +title = "Sigal test gallery ☺" source = 'pictures' thumb_suffix = '.tn' thumb_size = (200, 150)