Rather than using calibre's smart quotes option, I decided to go old school and use sed. I wrote a sed script that does a good job of creating html smart quotes.
I'm attaching the file, to use it type
Code:
sed -f qscript.txt input file > output file
at a unix command prompt.
Note, as is, this script only works with GNU Sed. To get it to work with other versions of sed, simply remove all the comments aside from the first one.
What you'll end-up with is a file that uses escaped quotations using the numeric character reference. It'll also handle apostrophes and m-dashes. The script has been tested and used only on text files I got from Project Gutenberg and converted to html.
This script has a tendency to be under-inclusive. I suggest that you open up the new file and do a search for double and single quotes. If there aren't a lot, you can manually change them. If there are a lot, I dunno.