From: Oleg Broytman Date: Fri, 8 Aug 2014 16:43:04 +0000 (+0400) Subject: Fix double recoding X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=12f41071097586798866c39ff45160554286f138;p=phdru.name%2Fphdru.name.git Fix double recoding --- diff --git a/reindex_blog.py b/reindex_blog.py index bb31517..b1bf4c6 100755 --- a/reindex_blog.py +++ b/reindex_blog.py @@ -2,7 +2,7 @@ # -*- coding: koi8-r -*- __author__ = "Oleg Broytman " -__copyright__ = "Copyright (C) 2006-2013 PhiloSoft Design" +__copyright__ = "Copyright (C) 2006-2014 PhiloSoft Design" import sys, os @@ -551,8 +551,6 @@ else: items = [] for item in tuple(reversed(all_titles_tags))[:10]: year, month, day, file, title, lead, tags = item - lead = lead.decode('koi8-r').encode('utf-8') - title = title.decode('koi8-r').encode('utf-8') url_path = "%s/%s/%s/%s" % (year, month, day, file) item = NewsItem( "%s-%s-%s" % (year, month, day), @@ -563,7 +561,6 @@ for item in tuple(reversed(all_titles_tags))[:10]: item.categoryList = tags body = bodies[(year, month, day, file)] body = absolute_urls(body, baseURL + url_path) - body = body.decode('koi8-r').encode('utf-8') item.body = body item.excerpt = get_first_p(body)