From: Oleg Broytman Date: Tue, 15 Jan 2013 17:24:10 +0000 (+0000) Subject: Do not convert to local encoding -- it will be converted later X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=f4b02d689691b72b8078187f69b199f226298a9a;p=phdru.name%2Fphdru.name.git Do not convert to local encoding -- it will be converted later git-svn-id: file:///home/phd/archive/SVN/phdru.name/scripts@142 7bb0bf08-9e0d-0410-b083-99cee3bf18b8 --- diff --git a/phd.py b/phd.py index ed53e83..1e34234 100644 --- a/phd.py +++ b/phd.py @@ -66,19 +66,18 @@ class phd(Template): def rst2html(self): from docutils.core import publish_parts - from m_lib.defenc import default_encoding as encoding parts = publish_parts(self.body_rst(), writer_name="html") - title = parts["title"].encode(encoding) or self.Title + title = parts["title"] or self.Title if title: title = "

%s

" % title - subtitle = parts["subtitle"].encode(encoding) + subtitle = parts["subtitle"] if subtitle: subtitle = "

%s

" % subtitle - body = parts["body"].encode(encoding) + body = parts["body"] parts = [part for part in (title, subtitle, body) if part] return "\n\n".join(parts)