fix unicode issues (python2.6 is crappy)

This commit is contained in:
Romain Bignon 2010-07-13 00:30:15 +02:00
commit cfffade6a5

View file

@ -54,7 +54,7 @@ class Comment(object):
self.comments.append(comment)
def parse_date(self, date_s):
return local2utc(datetime.strptime(unicode(date_s.strip()), u'le %d/%m/%Y à %H:%M.'))
return local2utc(datetime.strptime(date_s.strip().encode('utf-8'), u'le %d/%m/%Y \xe0 %H:%M.'.encode('utf-8')))
def iter_all_comments(self):
for comment in self.comments: