git.iko.soy/typeable/pandoc
on master help sign in
Use iconv on output as well as input in wrapper scripts.
a4a2792fiddlosopher
html2markdown+2−2
@@ -12,7 +12,7 @@
12}
12}
13
13
14if [ -z "$1" ] || [ -f $1 ]; then
14if [ -z "$1" ] || [ -f $1 ]; then
15− tidy -utf8 $1 2>/dev/null | pandoc -r html -w markdown -s
15+ tidy -utf8 $1 2>/dev/null | pandoc -r html -w markdown -s | iconv -f utf-8
16else
16else
17 # Treat given argument as an URL. Locate a
17 # Treat given argument as an URL. Locate a
18 # sensible text based browser (note the order).
18 # sensible text based browser (note the order).
@@ -35,5 +35,5 @@ else
35 exit 1 ;;
35 exit 1 ;;
36 esac
36 esac
37 # Fetch and feed to pandoc.
37 # Fetch and feed to pandoc.
38− $DUMPER $OPT $1 2>/dev/null | tidy -utf8 2>/dev/null | pandoc -r html -w markdown -s
38+ $DUMPER $OPT $1 2>/dev/null | tidy -utf8 2>/dev/null | pandoc -r html -w markdown -s | iconv -f utf-8
39fi
39fi
latex2markdown+1−1
@@ -4,4 +4,4 @@
4 echo >&2 "You need 'pandoc' to use this program!"
4 echo >&2 "You need 'pandoc' to use this program!"
5 exit 1
5 exit 1
6}
6}
7−iconv -t utf-8 $* | pandoc -r latex -w markdown -s
7+iconv -t utf-8 $* | pandoc -r latex -w markdown -s | iconv -f utf-8
markdown2html+1−1
@@ -4,4 +4,4 @@
4 echo >&2 "You need 'pandoc' to use this program!"
4 echo >&2 "You need 'pandoc' to use this program!"
5 exit 1
5 exit 1
6}
6}
7−iconv -t utf-8 $* | pandoc
7+iconv -t utf-8 $* | pandoc | iconv -f utf-8
markdown2latex+1−1
@@ -4,4 +4,4 @@
4 echo >&2 "You need 'pandoc' to use this program!"
4 echo >&2 "You need 'pandoc' to use this program!"
5 exit 1
5 exit 1
6}
6}
7−iconv -t utf-8 $* | pandoc -w latex -s
7+iconv -t utf-8 $* | pandoc -w latex -s | iconv -f utf-8
markdown2pdf+1−1
@@ -58,7 +58,7 @@ TEMP=${TMPDIR-/tmp}/markdown2pdf.$$
58trap "status=$?; rm -rf $TEMP; exit $status" 0 INT
58trap "status=$?; rm -rf $TEMP; exit $status" 0 INT
59mkdir -p $TEMP
59mkdir -p $TEMP
60
60
61−iconv -t utf-8 $infile | pandoc -w latex -s > $TEMP/$BASE.tex
61+iconv -t utf-8 $infile | pandoc -w latex -s | iconv -f utf-8 > $TEMP/$BASE.tex
62(
62(
63 cd $TEMP
63 cd $TEMP
64 if ! pdflatex -interaction=batchmode $BASE.tex >/dev/null 2>&1; then
64 if ! pdflatex -interaction=batchmode $BASE.tex >/dev/null 2>&1; then