* src/plugins/Merge.py (gen_key,name_compare):
Fall back to not using soundex if the charset can't be latin-1 encoded. svn: r2778
This commit is contained in:
parent
154b7ef6f4
commit
78fc879948
@ -1,3 +1,7 @@
|
|||||||
|
2004-02-05 Alex Roitman <shura@alex.neuro.umn.edu>
|
||||||
|
* 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 <michel.guitel@free.fr>
|
2004-02-05 Michel Guitel <michel.guitel@free.fr>
|
||||||
* doc/gramps-manual/fr/cmdline.xml: Update.
|
* doc/gramps-manual/fr/cmdline.xml: Update.
|
||||||
* doc/gramps-manual/fr/filtref.xml: Update.
|
* doc/gramps-manual/fr/filtref.xml: Update.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Gramps - a GTK+/GNOME based genealogy program
|
# 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
|
# 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
|
# 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
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# $Id$
|
||||||
|
|
||||||
"Database Processing/Merge people"
|
"Database Processing/Merge people"
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
@ -292,13 +294,19 @@ class Merge:
|
|||||||
|
|
||||||
def gen_key(self,val):
|
def gen_key(self,val):
|
||||||
if self.use_soundex:
|
if self.use_soundex:
|
||||||
return soundex.soundex(val)
|
try:
|
||||||
|
return soundex.soundex(val)
|
||||||
|
except UnicodeEncodeError:
|
||||||
|
return val
|
||||||
else:
|
else:
|
||||||
return val
|
return val
|
||||||
|
|
||||||
def name_compare(self,s1,s2):
|
def name_compare(self,s1,s2):
|
||||||
if self.use_soundex:
|
if self.use_soundex:
|
||||||
return soundex.compare(s1,s2)
|
try:
|
||||||
|
return soundex.compare(s1,s2)
|
||||||
|
except UnicodeEncodeError:
|
||||||
|
return s1 == s2
|
||||||
else:
|
else:
|
||||||
return s1 == s2
|
return s1 == s2
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user