From 874391c26c382ab484b2f72aeb6436087d3d9109 Mon Sep 17 00:00:00 2001 From: Stefan Huber Date: Mon, 16 Apr 2018 18:56:07 +0200 Subject: [PATCH] pycarddav: Add utf8-decode patch [2] --- app-misc/pycarddav/files/utf8-decode.patch | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 app-misc/pycarddav/files/utf8-decode.patch diff --git a/app-misc/pycarddav/files/utf8-decode.patch b/app-misc/pycarddav/files/utf8-decode.patch new file mode 100644 index 0000000..b29cedd --- /dev/null +++ b/app-misc/pycarddav/files/utf8-decode.patch @@ -0,0 +1,17 @@ +--- a/pycarddav/model.py 2018-04-15 18:49:08.335147745 +0200 ++++ b/pycarddav/model.py 2018-04-15 18:49:53.957408081 +0200 +@@ -207,7 +207,13 @@ + + @property + def fname(self): +- return unicode(self['FN'][0][0]) if self['FN'] else '' ++ utext = self['FN'][0][0] if self['FN'] else '' ++ try: ++ utext = unicode(utext, 'utf8') ++ except TypeError: ++ pass ++ ++ return utext + + @fname.setter + def fname(self, value): -- 2.39.5