From f8059fd10cef349f2cb8e7644c425ddfdbffac31 Mon Sep 17 00:00:00 2001 From: Josip Date: Tue, 21 Jan 2014 19:23:54 +0100 Subject: [PATCH] 7313: 'utf8' codec can't decode byte 0xa0 in position 6: invalid start byte --- gramps/plugins/lib/libgedcom.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gramps/plugins/lib/libgedcom.py b/gramps/plugins/lib/libgedcom.py index 27811b1b4..9c0ff7b8b 100644 --- a/gramps/plugins/lib/libgedcom.py +++ b/gramps/plugins/lib/libgedcom.py @@ -143,9 +143,14 @@ from gramps.gen.db.dbconst import EVENT_KEY from gramps.gui.dialog import WarningDialog from gramps.gen.lib.const import IDENTICAL, DIFFERENT from gramps.gen.lib import (StyledText, StyledTextTag, StyledTextTagType) -from gramps.gen.constfunc import cuni, conv_to_unicode, STRTYPE, UNITYPE +from gramps.gen.constfunc import cuni, conv_to_unicode, STRTYPE, UNITYPE, win from gramps.plugins.lib.libplaceimport import PlaceImport +# string.whitespace in some configuration is changed if it is imported +# after setting locale (adding '0xa0') +if win() and sys.version_info[0] < 3: + string.whitespace = ' \t\n\r\v\f' + #------------------------------------------------------------------------- # # constants