From e613f02469b7107a602ffe145d3036938a1cd7ba Mon Sep 17 00:00:00 2001 From: Benny Malengier Date: Fri, 11 Jan 2013 13:04:50 +0000 Subject: [PATCH] fix encoding issue for python 3 svn: r21056 --- gramps/gen/db/read.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gramps/gen/db/read.py b/gramps/gen/db/read.py index 486386374..e9fe01f0d 100644 --- a/gramps/gen/db/read.py +++ b/gramps/gen/db/read.py @@ -127,7 +127,10 @@ def __index_surname(surn_list): NameOriginType.PATRONYMIC, NameOriginType.MATRONYMIC]) ]) else: surn = "" - return surn.encode('utf-8') + if sys.version_info[0] < 3: + return surn.encode('utf-8') + else: + return surn #-------------------------------------------------------------------------