From a99b48711fea927e0ba73e59aafca162b11a2649 Mon Sep 17 00:00:00 2001 From: "D.A.Lordemann" Date: Mon, 24 Oct 2022 12:21:38 -0700 Subject: [PATCH] Fix corrupted NOTE tag in Gedcom export Remove Python2 code obsoleted by Python3, which was corrupting GEDCOM export of Gramps Notes text that includes multi-byte utf-8 characters. Fixes #12709. --- gramps/plugins/export/exportgedcom.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gramps/plugins/export/exportgedcom.py b/gramps/plugins/export/exportgedcom.py index d674ec4c6..0615ca972 100644 --- a/gramps/plugins/export/exportgedcom.py +++ b/gramps/plugins/export/exportgedcom.py @@ -160,10 +160,9 @@ def breakup(txt, limit): data = [] while len(txt) > limit: # look for non-space pair to break between - # do not break within a UTF-8 byte sequence, i. e. first char >127 + # fix issue #0012709 by removing Python2 code obsoleted by Python3 idx = limit - while (idx > 0 and (txt[idx - 1].isspace() or txt[idx].isspace() or - ord(txt[idx - 1]) > 127)): + while (idx > 0 and (txt[idx - 1].isspace() or txt[idx].isspace())): idx -= 1 if idx == 0: #no words to break on, just break at limit anyway