#8219 closed (fixed)
RSS Syndication UnicodeDecodeError
Reported by: | alperkanat | Owned by: | nobody |
---|---|---|---|
Component: | contrib.syndication | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
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..
Attachments (1)
Change History (4)
by , 16 years ago
comment:1 by , 16 years ago
milestone: | post-1.0 → 1.0 |
---|---|
Triage Stage: | Unreviewed → Ready for checkin |
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.
comment:2 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
decoding ascii instead of utf-8