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.
This commit is contained in:
D.A.Lordemann 2022-10-24 12:21:38 -07:00 committed by Nick Hall
parent d5d86e9139
commit a99b48711f

View File

@ -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