diff --git a/benedict/serializers/plist.py b/benedict/serializers/plist.py index 8fea918..0c3cf78 100644 --- a/benedict/serializers/plist.py +++ b/benedict/serializers/plist.py @@ -6,6 +6,7 @@ from benedict.serializers.abstract import AbstractSerializer import plistlib import six +import unicodedata class PListSerializer(AbstractSerializer): @@ -17,6 +18,8 @@ class PListSerializer(AbstractSerializer): def decode(self, s, **kwargs): if six.PY2: + if isinstance(s, unicode): + s = unicodedata.normalize('NFKD', s).encode('ascii', 'ignore') return plistlib.readPlistFromString(s) kwargs.setdefault('fmt', plistlib.FMT_XML) encoding = kwargs.pop('encoding', 'utf-8')