|
From: tchomby <tc...@go...> - 2009-02-26 18:34:48
|
Can anyone tell me how to avoid this from python-markdown?
MARKDOWN-CRITICAL: "UnicodeDecodeError: Markdown only accepts
unicode or ascii input."
I'm reading-in text files and passing some of the contents to
python-markdown. The file contents are read into a list of strings
like this:
f = open(path,"r")
lines = f.readlines()
and this list of strings is later converted into one long string with
join and then passed to python-markdown like this:
from markdown import Markdown
md = Markdown()
def markdown(text):
return md.convert(text)
All this unicode stuff in python is really confusing.
|