|
From: Dave P. <dav...@gm...> - 2012-12-10 17:29:22
|
On 10 December 2012 17:05, Waylan Limberg <wa...@gm...> wrote:
> On Mon, Dec 10, 2012 at 11:30 AM, Dave Pawson <dav...@gm...> wrote:
>> I think the error I was getting shows that didn't happen in my case?
>> 0x2234 as the character
>> Python 2.7
>> Emacs encoding set to utf-8
>>
>> cmd line either defaulted or -e utf-8 (if that is right?)
>> markdown >> file.ext
>>
>> I received an error.
>>
>
> And I can't seem duplicate that error on my system with the latest
> code. Which makes me wonder if perhaps the problem is with your
> script, but I can't say for sure.
Script as in bash script?
#!/bin/bash
source ~/bin/dpFunctions.sh
# Run python markdown with following extensions
# abbr, def_list
# See /installation/python/pymarkdown
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 -x toc --noisy -f
tmp.tmp ${1}
cat tmp.tmp >>${op}
echo """
</body>
</html>
""" >> $op
Now corrected.
If you run that more simply
echo -e "<html>" >op.html
python -m markdown -v -e utf-8 -o xhtml1 -x extra -x toc --noisy >>op.html
echo -e "</html>" >>op.html
with a md file containing 0x2234 you should see the error.
Running directly or with -f sidesteps this one.
HTH
--
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.
http://www.dpawson.co.uk
|