View Single Post
Old 11-02-2008, 03:59 AM   #6
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,560
Karma: 20150435
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
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.
Jellby is offline   Reply With Quote