From fb5362ba1f2184c6745000c284e52cce65e04d2c Mon Sep 17 00:00:00 2001 From: Tim G L Lyons Date: Mon, 8 Oct 2012 09:30:59 +0000 Subject: [PATCH] 0005088: Narrated Web Site Report sort order different Windows vs Linux. Fixed to use same Utils routine as person model. svn: r20536 --- src/plugins/webreport/NarrativeWeb.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/plugins/webreport/NarrativeWeb.py b/src/plugins/webreport/NarrativeWeb.py index b55573647..0a5007e08 100644 --- a/src/plugins/webreport/NarrativeWeb.py +++ b/src/plugins/webreport/NarrativeWeb.py @@ -8183,11 +8183,15 @@ def sort_people(dbase, handle_list): sname_sub[surname].append(person_handle) sorted_lists = [] - temp_list = sorted(sname_sub, key=locale.strxfrm) + # According to the comment in flatbasemodel: This list is sorted + # ascending, via localized string sort. conv_unicode_tosrtkey_ongtk which + # uses strxfrm, which is apparently broken in Win ?? --> they should fix + # base lib, we need strxfrm, fix it in the Utils module. + temp_list = sorted(sname_sub, key=Utils.conv_unicode_tosrtkey_ongtk) for name in temp_list: slist = sorted(((sortnames[x], x) for x in sname_sub[name]), - key=lambda x:locale.strxfrm(x[0])) + key=lambda x:Utils.conv_unicode_tosrtkey_ongtk(x[0])) entries = [x[1] for x in slist] sorted_lists.append((name, entries))