diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 1ecc7134c..f40d15b95 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,7 @@ +2004-02-05 Alex Roitman + * src/plugins/Merge.py (gen_key,name_compare): + Fall back to not using soundex if the charset can't be latin-1 encoded. + 2004-02-05 Michel Guitel * doc/gramps-manual/fr/cmdline.xml: Update. * doc/gramps-manual/fr/filtref.xml: Update. diff --git a/gramps2/src/plugins/Merge.py b/gramps2/src/plugins/Merge.py index 3e1c45754..3b406c937 100644 --- a/gramps2/src/plugins/Merge.py +++ b/gramps2/src/plugins/Merge.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2000 Donald N. Allingham +# Copyright (C) 2000-2004 Donald N. Allingham # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -18,6 +18,8 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# $Id$ + "Database Processing/Merge people" #------------------------------------------------------------------------- @@ -292,13 +294,19 @@ class Merge: def gen_key(self,val): if self.use_soundex: - return soundex.soundex(val) + try: + return soundex.soundex(val) + except UnicodeEncodeError: + return val else: return val def name_compare(self,s1,s2): if self.use_soundex: - return soundex.compare(s1,s2) + try: + return soundex.compare(s1,s2) + except UnicodeEncodeError: + return s1 == s2 else: return s1 == s2