#5663: markdown 1.6b unicodedecodeerror
------------------------------------------------------------+---------------
Reporter: Koen Biermans <[EMAIL PROTECTED]> | Owner:
mboersma
Status: reopened |
Component: Contrib apps
Version: SVN |
Resolution:
Keywords: markdown |
Stage: Accepted
Has_patch: 0 |
Needs_docs: 0
Needs_tests: 0 |
Needs_better_patch: 0
------------------------------------------------------------+---------------
Changes (by Koen Biermans <[EMAIL PROTECTED]>):
* status: closed => reopened
* resolution: worksforme =>
Comment:
There are no strange characters in those tests. But when you try this:
{{{
>>> import markdown
>>> markdown.markdown(u'dépot')
u'<p>d\x82pot\n</p>
>>> from django.contrib.markup.templatetags import markup
>>> markup.markdown(u'dépot')
Traceback(most recent call last):
...
UnicodeDecodeError: 'ascii' codec can't decode byt 0xc2 in position 1:
ordinal not in range(128)
}}}
In the templatetag the values are wrapped into a smart_str() call, so
django is passing in a bytestring, but markdown is expecting unicode it
seems (at least it can handle it well now).
--
Ticket URL: <http://code.djangoproject.com/ticket/5663#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
-~----------~----~----~----~------~----~------~--~---