Apostrophes

18 views
Skip to first unread message

theboo...@gmail.com

unread,
Jan 17, 2024, 2:59:22 PMJan 17
to GEDitCOM II Discussions
I mentioned this, in a more restricted, context, a few years ago but hadn't realised just how important it would become for me later, or what was causing it.

Before I moved to GeditCom around 2015, I'd used a variety of softwares, mainly in Windows) and had exported and imported GEDCOM files along the way. Hence, I suspect that this problem has many origins - different softwares, different keyboards.

Anyway, when you press the apostrophe key as in St Mark's Church, GEDitCOM II enters a straight apostrophe. Many word processors (eg Apple Pages) would convert it to a curly apostrophe, unless it's at the start of a word in which case they, incorrectly, convert it to an opening single quote.which looks like an inverted curly apostrophe.

Of course, you can ensure the right sort of apostrophe on a Mac by pressing Shift-Option-].

But, due to years of using different programs and computers, my GeditCom database contains a mixture of straight apostrophes and curly ones.

So, if I search for St Mark's Church (using the apostrophe key), I only find those with a straight apostrophe and have to do it again using Shift-Option-] (the curly apostrophe) to find the rest. I've only just worked that out.

It turns out that I have thousands of records for each kind of apostrophe and I want them to all be the same - so that I can find them - and also so they look the same in reports.

I want the curly apostrophe in all cases.

Is there a quick way to do this? I might try and do a script but I'm not good at that stuff.

Cheers

Mick


Jim Eggert

unread,
Jan 17, 2024, 7:00:24 PMJan 17
to geditcom-ii...@googlegroups.com
I would just use a good text editor (one with grep) and edit the underlying GEDCOM file.

=Jim

John Nairn, Developer

unread,
Jan 18, 2024, 12:03:04 PMJan 18
to GEDitCOM II Discussions
Actually, GEDitCOM II does use smart quotes (most places). The only exception is if you are entering raw html text into notes. In that case, smart quotes can cause much havoc, such as when adding an attribute to an html tag that must be between straight quotes). I just tested in a notes field and an address field (most likely places for St. Mark's Church) and I got automatic substitution to curly quotes. Where are you seeing GEDitCOM II not allowing smart quotes? You should verify you don't have them turned off for your system (which apps like Pages might be ignoring in favor of their own settings). Go to

System Settings App -> Keyboard pane -> Click "Edit" in "Text Input" -> Verify "Use Smart Quotes and Dashes" is activated.

The separate issue is how to fix them when they are there. As Jim suggested a text editor could do it (if you are comfortable with things like grep). That is often the best approach for a one-time fix. If you might have the problem in many files, a GEDitCOM II script would be good option too. The key questions: 1. Is the time to write the script less than time to do all the manual test editing.? 2. Will you need to make this edit in more than one file?

If you do want a script, it would not be hard. The best way is to use a current script as a template (such as those in the "Miscellaneous Tasks" extension). Some key steps are

1. Include an option to process all records or just selected records. The later could speed things up by searching for all records with curly quotes in GEDItCOM II first and then selecting all the ones that are found. The script would only need to check them and the "listedRecords" property of a GEDCOM document when search window is in front, will return a list of all found records.

2. For each record can use replace(s1\s2\string) expression to change the gedcom data property.

3. A good  script would have a progress bar (in case it takes a long time in a large file) and maybe provide a summary when done.

I can help if you think it would be a useful script. It could be added to the "Miscellaneous Tasks" extension. I think it only makes sense to convert curly quotes to straight ones. Converting straight to curly might have unwanted consequences (such as in html features).

Regards,
John

theboo...@gmail.com

unread,
Jan 18, 2024, 2:46:11 PMJan 18
to GEDitCOM II Discussions
Thanks John and Jim,

I may have confused myself a wee bit in thinking GCII produced a straight apostrophe. I pasted text from GCII into another app so that I could zoom it and  see the character properly. Maybe the app converted it.

So, unless I had wrong smart quote settings previously (they are all right now), I think the majority, or even all, of the straight apostrophes may be legacy ones from way back. I need to change those to curly ones. I much prefer those in printed documents. 

Fortunately I spotted the problems I could have had with HTML notes in good time and so didn't take up Jim's suggestion of a text editor immediately. I have a fair few HTML notes.

Otherwise, though, Jim's suggestion is a useful one that I can use for a range of one-off tasks. Thanks, Jim.

I'm actually changing the apostrophes manually and have almost finished the most immediately important file. It's taken a while but worth it to me.

The second file, has few or zero HTML notes so the text editor will probably be the way to go. I'm okay with very basic grep

I shall also play around with John's suggestions for developing a script though, thanks.

Best

Mick

theboo...@gmail.com

unread,
Jan 18, 2024, 3:03:41 PMJan 18
to GEDitCOM II Discussions
I have just spotted a place where GEDitCOM II seems to use straight quotes. See attached.CleanShot 2024-01-19 at 06.00.11@2x.jpeg
Reply all
Reply to author
Forward
0 new messages