bug report #2162: handle surnames that have spaces within them; merged from gramps30

svn: r10770
This commit is contained in:
Stéphane Charette
2008-05-31 07:16:13 +00:00
parent b57eafff1a
commit e57e3fa7c7
2 changed files with 25 additions and 4 deletions

View File

@@ -359,7 +359,12 @@ class FamilyLinesReport(Report):
# convert the 'surnamecolors' string to a dictionary of names and colors
self._surnamecolors = {}
_opt = menu.get_option_by_name('surnamecolors')
tmp = _opt.get_value().split()
tmp = _opt.get_value()
if (tmp.find(u'\xb0') >= 0):
tmp = tmp.split(u'\xb0') # new style delimiter (see bug report #2162)
else:
tmp = tmp.split(' ') # old style delimiter
while len(tmp) > 1:
surname = tmp.pop(0).encode('iso-8859-1', 'xmlcharrefreplace')
colour = tmp.pop(0)