From: Waylan L. <wa...@gm...> - 2007-10-31 01:36:18
|
On 10/30/07, Kent Johnson <ke...@td...> wrote: > Yuri Takhteyev wrote: > > > I want to stick with a simple rule: if it's a string, then > > its unicode. > > > > So, I think we should offer the following functions: > > > > 1. unicode text -> unicode html > > Hmm...one problem with this (and Waylan's suggestion of making the > encoding parameter to markdown() do something useful) is that until > 1.6b, markdown() did in fact work perfectly well with encoded text and > it was not at all clear that this was not the intended usage. When 1.6b > came out I just commented out the call to removeBOM(), complained to the > list, and continued on my way. > > I use markdown from Django with the markdown support included with > Django; presumably many other people are also. For example: > http://www.freewisdom.org/projects/python-markdown/Django > > which is based on this post by Waylan: > http://achinghead.com/archive/70/django-blog-and-markdown/ > > which is pretty close to the current form of the Django markdown filter. > You almost have a point. In fact, I was about to make the same argument. Then I remembered that that was before the unicode branch was merged in Django. Ticket 2910 [1] needs to be updated for this and hasn't. Well, the latest patch does try to address it, but I was never convinced it was right. Yuri's clarifications make it clear what needs to happen in that patch. We make sure we have unicode to pass in (Django has the mechanisms to force the issue) and so we should always get unicode out. [1]: http://code.djangoproject.com/attachment/ticket/2910/2910-2.diff BTW, I consider ticket 2910 the most up-to-date approach to Django integration. The Markdown docs should probably be updated I suppose those still using pre-unicode versions of Django could have issues. But if your not updating Django, then I wouldn't expect you to update its dependencies either.. -- ---- Waylan Limberg wa...@gm... |