diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 0bcda67b4..9a9b8ed88 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,6 @@ +2006-07-23 Brian Matherly + * src/plugins/NarrativeWeb.py: fix bug for no surname (bug #265) + 2006-07-23 Manfred Paulus * src/BaseDoc.py: fix angle calculation * src/docgen/PSDrawDoc.py: fix angle calculation diff --git a/gramps2/src/plugins/NarrativeWeb.py b/gramps2/src/plugins/NarrativeWeb.py index cf068ab41..e157c7f61 100644 --- a/gramps2/src/plugins/NarrativeWeb.py +++ b/gramps2/src/plugins/NarrativeWeb.py @@ -2744,11 +2744,14 @@ def sort_people(db,handle_list): return sorted_lists def strcoll_case_sensitive(string1,string2): - """ This function was written because string comparisons in Windows + """ This function was written because string comparisons seem to be case insensitive if the string is longer than one character. """ - # First, compare the first character - diff = locale.strcoll(string1[0],string2[0]) + if len(string1) > 0 and len(string2) > 0: + diff = locale.strcoll(string1[0],string2[0]) + else: + diff = 0 + if diff == 0: # If the first character is the same, compare the rest diff = locale.strcoll(string1,string2)