#3664: UnicodeDecodeError in contrib/syndication/feeds.py
-------------------------------------------------+--------------------------
Reporter: Ville Säävuori <[EMAIL PROTECTED]> | Owner:
jacob
Status: new | Component:
Documentation
Version: SVN | Resolution:
Keywords: unicode | Stage:
Accepted
Has_patch: 0 | Needs_docs: 0
Needs_tests: 0 | Needs_better_patch: 0
-------------------------------------------------+--------------------------
Changes (by mtredinnick):
* owner: adrian => jacob
* component: RSS framework => Documentation
Comment:
This is a documentation bug, rather than a code bug.
Anything you pass up as a link, including things returned from item_link()
in syndication classes and get_absolute_urls() on models, must already be
in the character set specified in RFC 1738 (the URL spec). So you must
already have done the necessary conversion from non-ASCII characters to
ASCII and called urllib.quote() if necessary. In the above example, you
are passing non-ASCII characters to something expecting content for a URL,
so it is failing.
We cannot perform the conversion to utf-8 and/or url quoting, because, for
example, the standard IRI -> URI conversion process is that you convert
first and then quote(), so we don't want to accidently do it twice (and
there are lots of other places where get_absolute_url() needs to already
be returning the correctly quoted string).
I will update the documentation.
--
Ticket URL: <http://code.djangoproject.com/ticket/3664#comment:3>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---