Inspired by SmartyPants (from John Gruber), I decided to modify its code in order to fix typography in ASS-formatted scripts. This script does pretty much the same thing as SmartyPants, but leaves non-dialogue text and ASS tags alone, working its magic only on dialogue text.
Naturally, it also faces the same limitations as SmartyPants: apostrophes at the start of sentences cannot be properly replaced. Users are advised to verify the output after running this script. But as a bonus, it removes italic tags.
To use, just run the command “SmartyASS.pl” in the directory containing SmartyASS.pl (or in any directory, if the directory containing SmartyASS.pl is in the $PATH environment variable). It can be used as a shell script, possibly requiring some editing of the first line to point at the correct path of the perl binary.
SmartyASS requires perl to run. Which version of it I do not know; I am only a one-day perl coder.