fixing the comments regarding encoding errors (I was confused by my own trial-and-error bug finding before -> there is no bug in creoleparser)
This commit is contained in:
parent
34acd9bf36
commit
9ff7845e18
1 changed files with 3 additions and 2 deletions
|
@ -10,12 +10,13 @@
|
||||||
|
|
||||||
#text can be creole-encoded, see http://www.wikicreole.org/imageServlet?page=CheatSheet%2Fcreole_cheat_sheet.png&width=340
|
#text can be creole-encoded, see http://www.wikicreole.org/imageServlet?page=CheatSheet%2Fcreole_cheat_sheet.png&width=340
|
||||||
title = "Brainstorming Online"
|
title = "Brainstorming Online"
|
||||||
# creoleparser seems to require "utf-8" encoded strings - unicode does not work (this seems to be a bug)
|
|
||||||
content01 = """
|
content01 = """
|
||||||
dieser mehrzeilige Text ist HTML-escaped und kann Umlaute enthalten.
|
dieser mehrzeilige Text ist HTML-escaped und kann Umlaute enthalten.
|
||||||
Falls er <Umlaute> **enthält**, dann muss die Datei utf8-codiert sein und der Text
|
Falls er <Umlaute> **enthält**, dann muss die Datei utf8-codiert sein und der Text
|
||||||
muss in unicode verwandelt werden (unicode(foo)).
|
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)
|
content01 = text2html(content01, encoding=None)
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue