For single quotes, since you can have apostrophes at every position ("don't", "teachers'", "'em"), I usually do the following:
1. Replace every ' in the middle of a word with & #8217; (remove the space between & and #, this is a synonym of ’)
2. Check every instance of a ' at the beginning of a word and replace it with ‘ if it's a quote mark, or & #8217; if it's an apostrophe.
3. For every ‘, find the corresponding closing mark (if any) and replace it with ’
4. Replace every remaning ' with & #8217;.
Unfortunatelly, steps 2 and 3 are not easy to automate.
Oh... and quotes are not always balanced, when a character's part in a dialogue takes several paragraphs, all paragraphs start with an opening quote mark, but only the last one has a closing mark.
Last edited by Jellby; 11-02-2008 at 04:02 AM.
|