From 6f5767cdf02f1652437118c9dbb353a6a24e1804 Mon Sep 17 00:00:00 2001 From: Unknown Date: Wed, 6 Jun 2001 04:36:51 +0000 Subject: [PATCH] Fixed utf8 parsing for python 2.0 svn: r93 --- src/GrampsParser.py | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/src/GrampsParser.py b/src/GrampsParser.py index 865798d6f..06e707c95 100644 --- a/src/GrampsParser.py +++ b/src/GrampsParser.py @@ -876,27 +876,19 @@ class GrampsParser(handler.ContentHandler): # # #--------------------------------------------------------------------- + + def endElement(self,tag): + + if self.func: + self.func(self,utf8_to_latin(self.data)) + self.func_index = self.func_index - 1 + self.func,self.data = self.func_list[self.func_index] + if sax == 1: - - def endElement(self,tag): - - if self.func: - self.func(self,utf8_to_latin(self.data)) - self.func_index = self.func_index - 1 - self.func,self.data = self.func_list[self.func_index] - def characters(self, data, offset, length): if self.func: self.data = self.data + data else: - - def endElement(self,tag): - - if self.func: - self.func(self,self.data) - self.func_index = self.func_index - 1 - self.func,self.data = self.func_list[self.func_index] - def characters(self, data): if self.func: self.data = self.data + data