From 9ff7845e18aa974f9468baca62f162f86db8b99a Mon Sep 17 00:00:00 2001 From: lars Date: Sun, 18 Apr 2010 01:54:00 +0000 Subject: [PATCH] fixing the comments regarding encoding errors (I was confused by my own trial-and-error bug finding before -> there is no bug in creoleparser) --- wortschlucker/templates/nodes/brainstorming.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wortschlucker/templates/nodes/brainstorming.html b/wortschlucker/templates/nodes/brainstorming.html index 45f12dd..cf09996 100644 --- a/wortschlucker/templates/nodes/brainstorming.html +++ b/wortschlucker/templates/nodes/brainstorming.html @@ -10,12 +10,13 @@ #text can be creole-encoded, see http://www.wikicreole.org/imageServlet?page=CheatSheet%2Fcreole_cheat_sheet.png&width=340 title = "Brainstorming Online" - # creoleparser seems to require "utf-8" encoded strings - unicode does not work (this seems to be a bug) content01 = """ dieser mehrzeilige Text ist HTML-escaped und kann Umlaute enthalten. Falls er **enthält**, dann muss die Datei utf8-codiert sein und der Text muss in unicode verwandelt werden (unicode(foo)). - """.encode("utf-8") + """ + # creoleparser returns an utf-8 encoded string by default, but this would cause "Markup" below to fail during decoding. + # The parameter "None" for "encoding" forces unicode output. This works with "Markup". content01 = text2html(content01, encoding=None) ?>