7066: fix our algorithm based on jewish.c in sdn

It looks like we had an earlier fork of the same code,
and the upstream had some bugs fixed.

git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23133 4ae1f11a-8b86-4847-b8af-ab372f36d1fd