From 12f41071097586798866c39ff45160554286f138 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Fri, 8 Aug 2014 20:43:04 +0400 Subject: [PATCH] Fix double recoding --- reindex_blog.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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) -- 2.39.5