1 of 3

How do I process text before I hand it over to enscript?

I'm trying to use enscript to print PDFs from Mutt, and hitting character encoding issues with curly quotes. So that an email with text like this:

“very dirty”    

Comes out as:

â\200\234very dirtyâ\200\235

My print script currently reads like this:

#!/usr/bin/env sh
INPUT="$1" PDIR="$HOME/Desktop" OPEN_PDF=evince

tmpfile="`mktemp $PDIR/mutt_XXXXXXXX.pdf`"
enscript --font=Courier8 $INPUT -2r --word-wrap --fancy-header=mutt -p - 2>/dev/null | ps2pdf - $tmpfile
$OPEN_PDF $tmpfile >/dev/null 2>&1 &
sleep 1
rm $tmpfile

Is there a way to replace the curly quotes before I send it to enscript? Or a character encoding I can use that will handle the quotes?