From 49645c6957d664d5a8c23c3149008cc75dbd23ed Mon Sep 17 00:00:00 2001 From: Tim G L Lyons Date: Mon, 13 May 2013 23:11:00 +0000 Subject: [PATCH] Encoding error in date parsing literals svn: r22288 --- gramps/plugins/importer/importprogen.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gramps/plugins/importer/importprogen.py b/gramps/plugins/importer/importprogen.py index 99f7733de..b5d038303 100644 --- a/gramps/plugins/importer/importprogen.py +++ b/gramps/plugins/importer/importprogen.py @@ -668,7 +668,7 @@ class ProgenParser(object): __date_pat1 = re.compile(r'(?P\d{1,2}) (-|=) (?P\d{1,2}) (-|=) (?P\d{2,4})', re.VERBOSE) __date_pat2 = re.compile(r'(?P\d{1,2}) (-|=) (?P\d{4})', re.VERBOSE) __date_pat3 = re.compile(r'(?P\d{3,4})', re.VERBOSE) - __date_pat4 = re.compile(r'(v|v√≥√≥r|voor|na|circa|ca|rond|¬±) (\.|\s)* (?P\d{3,4})', re.VERBOSE) + __date_pat4 = re.compile(r'(v|vóór|voor|na|circa|ca|rond|±) (\.|\s)* (?P\d{3,4})', re.VERBOSE) __date_pat5 = re.compile(r'(oo|OO) (-|=) (oo|OO) (-|=) (?P\d{2,4})', re.VERBOSE) __date_pat6 = re.compile(r'(?P(%s)) (\.|\s)* (?P\d{3,4})' % '|'.join(list(month_values.keys())), re.VERBOSE | re.IGNORECASE) def __create_date_from_text(self, txt, diag_msg=None): @@ -723,7 +723,7 @@ class ProgenParser(object): m = self.__date_pat4.match(txt) if m: year = int(m.group('year')) - if m.group(1) == 'voor' or m.group(1) == 'v' or m.group(1) == 'v√≥√≥r': + if m.group(1) == 'voor' or m.group(1) == 'v' or m.group(1) == 'vóór': date.set(Date.QUAL_NONE, Date.MOD_BEFORE, Date.CAL_GREGORIAN, (0, 0, year, None)) elif m.group(1) == 'na': date.set(Date.QUAL_NONE, Date.MOD_AFTER, Date.CAL_GREGORIAN, (0, 0, year, None))