Curly-quotes is a simple utility that converts 'straight' "quotes" to typographically pleasing ‘curly’ “quotes”.
You will need GHC to compile this.
make
sudo make install
Text is read from standard input, and the same text is written to standard output, but with straight quotes converted to curly quotes.
$ cat example "It'll never work," she said. What's this 'emergency balloon' for?
$ curly-quotes < example “It’ll never work,” she said. What’s this ‘emergency balloon’ for?
The program’s ability to infer the correct character is not perfect.
In particular, an apostrophe at the start of a word contraction will
be erroneously converted to an opening quote; for example fish 'n'
chips
becomes fish ‘n’ chips
(incorrect) instead of fish ’n’
chips
(correct).