* FH V6 Plugin Review

For users to report plugin bugs and request plugin enhancements; and for authors to test new/new versions of plugins, and to discuss plugin development (in the Programming Technicalities sub-forum). If you want advice on choosing or using a plugin, please ask in General Usage or an appropriate sub-forum.
Post Reply
User avatar
tatewise
Megastar
Posts: 27084
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

FH V6 Plugin Review

Post by tatewise » 18 Dec 2014 12:22

I have quickly reviewed the V6 Plugin Store (excluding my Plugins).
The following Plugins may compromise FH V6 data once users start using Unicode characters outside the ANSI/CP1252 set.
When the Plugin ends there will be a message saying accented characters may have been upset, but does not say exactly which fields are affected.
Those accented characters will have been replaced by unaccented letters and other symbols by ? question marks.
The only solution is to use Edit > Undo Plugin Updates as advised by the warning message.

Add GRO Event to an Individual (no source) by Rodney Begg
Birth/Marriage/Death local Notes may lose Unicode chars.

Address Reformatting by Peter Richmond
Any Address fields may lose Unicode chars.

Clean Living People by Jane Taubman
Any Individual Names may lose Unicode chars.
If changed to use UTF-8 encoding to preserve Unicode, then the upper() function will not work reliably on UTF-8 chars.
This Plugin also loads/saves settings to file, and the settingfile path must be ANSI encoded.
Luckily, if FH is V5.0.7 or later, the Plugin uses fhGetPluginDataFileName('LOCAL_MACHINE')
This usually gives C:\ProgramData\Calico Pie\Family Historian\Plugin Data\Clean Living People.dat and is entirely ASCII characters.
So fhInitialise(5,0,7) should be added.

Clean Up Notes by Jane Taubman
Any cleaned Notes may lose Unicode chars.

Clean up Surname Capitalisation by Jane Taubman
Any Individual Names may lose Unicode chars even in forenames.
If changed to use UTF-8 encoding to preserve Unicode, then the upper() & lower() functions will not work reliably on UTF-8 chars.

Keyword Update by Peter Richmond
Media Keywords may lose Unicode chars.

I think in most, simply using the following statement at the start will fix it.

Code: Select all

if fhGetAppVersion() > 5 then
   fhSetStringEncoding("UTF-8")
   iup.SetGlobal("UTF8MODE","YES")    -- Only if iuplua is used
end
That can be done even before the Author has purchase V6.

Also the Plugins using upper() & lower() need to use the UTF-8 variants defined in plugins:code_snippets:unicode_string_functions|> Unicode String Functions (code snippet).

A snag is that when users upgrade from V5 to V6, any Plugins they already have installed will remain so. Few, if any, of the above Plugins have any mechanism to tell users they have been updated, so the loss of Unicode chars will take them by surprise. They will have to rely upon Edit > Undo Plugin Updates or Backups.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
davidm_uk
Megastar
Posts: 740
Joined: 20 Mar 2004 12:33
Family Historian: V7
Location: St Albans, Hertfordshire, UK

Re: FH V6 Plugin Review

Post by davidm_uk » 19 Dec 2014 13:58

Would it be worth making this, or a summary of the plugin compatibility with V5 and V6, a sticky/locked post, for ease of reference?

It's a bit concerning that some non V6 compatible plugins might mess up V6 data, perhaps without any sort of warning.
David Miller - researching Miller, Hare, Walker, Bright (mostly Herts, Beds, Dorset and London)

User avatar
tatewise
Megastar
Posts: 27084
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: FH V6 Plugin Review

Post by tatewise » 19 Dec 2014 15:51

There is a catch all warning at the end of Plugins, but the user needs to know to use Undo > Plugin Updates to undo the damage.

Even if this thread was made sticky, non-FHUG members would still run foul of the Plugins, and even if the Plugins are updated there is no mechanism to inform users they need to download them.

If the Plugins are already installed, and a user upgrades to FH V6, there is nothing to prevent the Plugins being run.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
Jane
Site Admin
Posts: 8441
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Re: FH V6 Plugin Review

Post by Jane » 19 Dec 2014 16:22

It's only a problem if you have unicode characters in the fields concerned and the message at the end does tell the user 1. a problem occurred and 2. how to undo it.

I will look at my plugins, but at the moment I have far too much on my plate to spend several hours on them this side of Christmas.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."

User avatar
PeterR
Megastar
Posts: 1129
Joined: 10 Jul 2006 16:55
Family Historian: V7
Location: Northumberland, UK

Re: FH V6 Plugin Review

Post by PeterR » 08 Feb 2015 14:20

I have now updated my two Plugins listed above, having tested them with FH V6.0.2. I can no longer test them with V5 but they should still work OK.

The Edit menu item Undo Plugin Updates suggests that Ctrl+Z is a keyboard shortcut for this command, but it doesn't seem to work. I think I reported this as a problem with FH V5.
Peter Richmond (researching Richmond, Bulman, Martin, Driscoll, Baxter, Hall, Dales, Tyrer)

User avatar
tatewise
Megastar
Posts: 27084
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: FH V6 Plugin Review

Post by tatewise » 08 Feb 2015 16:15

Peter, I presume you simply added the code I suggested, and left them as ANSI encoded?
I can test them on FH V5 when they have been approved in the Plugin Store.
I guess you tested them in FH V6 by entering some Unicode accented characters?

Ctrl-Z and Ctrl-Y work for me in FH V6.0.2 providing you have no Menu dropdown selected, and not just for Plugins but any Edit > Undo/Redo.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
PeterR
Megastar
Posts: 1129
Joined: 10 Jul 2006 16:55
Family Historian: V7
Location: Northumberland, UK

Re: FH V6 Plugin Review

Post by PeterR » 08 Feb 2015 17:12

Mike, Yes I just added the code you suggested plus relevant comments, and saved them; they're still ANSI coded.
Yes, I added some Unicode accented characters and ran the plugins before and after modification to be sure the problem is fixed.

I find that Ctrl+Z for Undo Plugin Updates works OK if I am viewing any window except the results window (the one probably on view when the Plugin ends and which most clearly shows the effects of the Plugin). If I'm viewing the results window, Ctrl+Z merely gives a "ping" sound, but the Edit menu option works OK..
Peter Richmond (researching Richmond, Bulman, Martin, Driscoll, Baxter, Hall, Dales, Tyrer)

User avatar
tatewise
Megastar
Posts: 27084
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: FH V6 Plugin Review

Post by tatewise » 08 Feb 2015 17:22

Ah! Yes, ditto Ctrl-Z/Y pings in Results Set window.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
tatewise
Megastar
Posts: 27084
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: FH V6 Plugin Review

Post by tatewise » 10 Feb 2015 17:46

Peter, both Plugins work OK in FH V5.

However, Keyword Update does not include the statement:
iup.SetGlobal("UTF8MODE","YES")
So, although it will update FH Media Keywords Ok, the iup dialogues will display Unicode characters in Keywords strangely.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
PeterR
Megastar
Posts: 1129
Joined: 10 Jul 2006 16:55
Family Historian: V7
Location: Northumberland, UK

Re: FH V6 Plugin Review

Post by PeterR » 11 Feb 2015 11:36

Thanks, Mike. Silly me! Corrected version now submitted.
Peter Richmond (researching Richmond, Bulman, Martin, Driscoll, Baxter, Hall, Dales, Tyrer)

Post Reply