Permalink
Browse files

Decode possible UTF-8 in formatted date.

strftime will return an encoded string for some locales. Need to decode it before combining it with the other strings.
  • Loading branch information...
1 parent 7fc9d80 commit bbbc590d61229fb876efcc4e2dea981b4b24d4f5 @drdrang committed Sep 23, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 archive-tweets.py
View
@@ -41,7 +41,7 @@ def setup_api():
ts = utc.localize(t.created_at).astimezone(homeTZ)
lines = ['',
t.text,
- ts.strftime(datefmt),
+ ts.strftime(datefmt).decode('utf8'),
urlprefix + t.id_str,
'- - - - -',
'']

0 comments on commit bbbc590

Please sign in to comment.