Skip to content

Commit

Permalink
[bugfix] non-ascii names break sync
Browse files Browse the repository at this point in the history
fixes geier#127
  • Loading branch information
ph1l committed Nov 21, 2018
1 parent edc9150 commit 6629236
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pycarddav/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def serialize(self):

@property
def name(self):
return unicode(self['N'][0][0]) if self['N'] else ''
return unicode(self['N'][0][0].decode('utf8')) if self['N'] else ''

@name.setter
def name(self, value):
Expand All @@ -207,7 +207,7 @@ def name(self, value):

@property
def fname(self):
return unicode(self['FN'][0][0]) if self['FN'] else ''
return unicode(self['FN'][0][0].decode('utf8')) if self['FN'] else ''

@fname.setter
def fname(self, value):
Expand Down

0 comments on commit 6629236

Please sign in to comment.