Description

i'm generating a rss feed from a model... it works fine.. but if i use LocaleTextCalendar somewhere in the template using some locale (tr_TR.UTF-8) it says:

UnicodeDecodeError at /feeds/latest/
'ascii' codec can't decode byte 0xc4 in position 9: ordinal not in range(128)

if i restart the development server and go to a page that doesn't include the LocaleTextCalendar with the locale, then the feed works fine.. But once I go to the page that includes the LocaleTextCalendar with locale, even the page that doesn't have it, won't work.. I searched through all the code if I assign some locale somewhere but nope.. I forgot to use u around the code but it still didn't solve this problem even I added u..

I don't really understand the problem description -- I understand the error, but not how you caused it. Still, the patch looks like a reasonable idea as a general rule.

The only problem is that there's probably no guarantee that strftime() will return any particular encoding at all, which is a bit of a problem. That's a problem with the underlying C library call, if I'm right. Nothing we can do about it without replacing strftime with our own version (which isn't impossible if it comes to that).

Promoting to checkin stats and setting the milestone, since the patch can't hurt and looks more consistent in any case.