From: Dave P. <dav...@gm...> - 2012-12-10 07:34:23
|
On 9 December 2012 15:57, Waylan Limberg <wa...@gm...> wrote: > Dave, > > I'll need more info to be able to help you. What version of > Python-Markdown are you using? What version of Python? What > specifically are you trying to do? Can you provide a minimal document > and command that replicates the problem? python 2.7.3 md.py from couple of days ago, so guess latest. I want to use utf-8 in output. the problem is now resolved, but others may see it. Solution below. I want HTML output, not the body element contents? I'm not sure why markdown.py doesn't do this. Is there a good reason? So I created a bash script bn=`nameonly $1` op=${bn}.html rmif tmp.tmp echo -e """ <!DOCTYPE html> <html> <head> <title> $1 </title> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /> <link rel=\"stylesheet\" href=\"/styles/css/md.css\" type=\"text/css\" /> </head> <body>""" >$op #python -m markdown -v -e utf-8 -o xhtml1 -x extra --noisy >> ${op} python -m markdown -v -e utf-8 -o xhtml1 -x extra --noisy -f tmp.tmp ${1} cat tmp.tmp >>${op} echo """ </body> </html> """ >> $op Not that I was redirecting output to the output file? (The commented out line) This created the problem. It would seem to be a difference between redirection and cp and >> The replacement line solves that problem. It would seem redirected output is unable to utilise an appropriate character set. The input which shows this error. 3. ∴ henrys car has four doors. (given) (u2234) is the character. HTH -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk |