#8300 closed (duplicate)
feedgenerator shouldn't use ascii to decode dates
| Reported by: | alperkanat | Owned by: | nobody |
|---|---|---|---|
| Component: | contrib.syndication | Version: | dev |
| Severity: | Keywords: | ||
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
if i use some locale like tr_TR.UTF-8 or any other locale, a date for the rss feed could be "10 Ağu" instead of "10 Aug".. Therefore, I get the following error messages:
UnicodeDecodeError at /feeds/latest/
'ascii' codec can't decode byte 0xc4 in position 9: ordinal not in range(128)
I think all decoding should be done using utf-8 instead of ascii.. And by the way there's a problem in line 241 of feedgenerator.py file:
handler.addQuickElement(u"pubDate", rfc2822_date(itempubdate).decode('links'))
'links' here should be something like ascii or especially utf-8..
Change History (4)
comment:1 by , 17 years ago
comment:3 by , 17 years ago
| Resolution: | → duplicate |
|---|---|
| Status: | new → closed |
Closing as a duplicate. Please reopen with an explanation of the difference if this is different from #8219.
sorry the links part is my fault :)