﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
6577	Python-Markdown 1.7 and Unicode Support	Waylan Limberg	nobody	"With the release of Python-Markdown 1.7, Unicode support for markdown is much stricter. Specifically the [http://www.freewisdom.org/projects/python-markdown/Using_as_a_Module docs] say:

> Note that markdown() expects either a simple ascii string or unicode as input and returns output as unicode. Do not pass 
> encoded strings to it. If your input is encoded, e.g. as UTF8, it is your responsibility to decode it.

Here's an example using Django's Unicode methods:

{{{
s = ""öäüß""

print force_unicode(markdown.markdown(smart_str(s)))
MARKDOWN-CRITICAL: ""UnicodeDecodeError: Markdown only accepts unicode or ascii  input.""
 
print force_unicode(markdown.markdown(smart_unicode(s)))
<p>öäüß</p>
}}}

The first try, which produces the error, is what Django currently does. The second is what it probably should do.

Note: This report has been moved from the unrelated ticket #2910 comment 17."		closed	Contrib apps	dev		duplicate	markup markdown		Unreviewed	0	0	0	0	0	0
