From 4819a830037ec56466a4d0fb35f6441db663774e Mon Sep 17 00:00:00 2001 From: Alexis Metaireau Date: Fri, 16 Mar 2012 21:13:24 +0100 Subject: [PATCH] Fix #171. Handle unicode filenames --- pelican/contents.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pelican/contents.py b/pelican/contents.py index 2a7dc22a..3386dba9 100644 --- a/pelican/contents.py +++ b/pelican/contents.py @@ -42,9 +42,10 @@ class Page(object): if 'AUTHOR' in settings: self.author = Author(settings['AUTHOR'], settings) else: + title = filename.decode('utf-8') if filename else self.title self.author = Author(getenv('USER', 'John Doe'), settings) warning(u"Author of `{0}' unknown, assuming that his name is " - "`{1}'".format(filename or self.title, self.author)) + "`{1}'".format(title, self.author)) # manage languages self.in_default_lang = True