From a925fedfcd5f4aba664a543eabbb1ebfd910014a Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Mon, 27 Jan 2003 04:53:38 +0000 Subject: [PATCH] UTF-8 to Latin-1 translation from Alexandre Duret-Lutz svn: r1273 --- src/plugins/GraphViz.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/plugins/GraphViz.py b/src/plugins/GraphViz.py index d68a9ea2c..0065e0a81 100644 --- a/src/plugins/GraphViz.py +++ b/src/plugins/GraphViz.py @@ -45,6 +45,7 @@ import Report import TextDoc import GenericFilter from intl import gettext as _ +from latin_utf8 import utf8_to_latin #------------------------------------------------------------------------ # @@ -333,8 +334,9 @@ def dump_person(person_list,file,adoptionsdashed,arrowheadstyle, mother = family.getMother() fadopted = frel != _("Birth") madopted = mrel != _("Birth") - if show_families and (person_dict.has_key(father.getId()) or - person_dict.has_key(mother.getId())): + if (show_families and + (father and person_dict.has_key(father.getId()) or + mother and person_dict.has_key(mother.getId()))): # Link to the family node. famid = string.replace(family.getId(),'-','_') file.write('p%s -> f%s [' % (pid, famid)) @@ -403,7 +405,7 @@ def dump_index(person_list,file,includedates,includeurl,colorize, file.write('color=deeppink, ') else: file.write('color=black, ') - file.write('fontname="Arial", label="%s"];\n' % label) + file.write('fontname="Arial", label="%s"];\n' % utf8_to_latin(label)) # Output families's nodes. if show_families: family_list = person.getFamilyList()