diff --git a/pyicloud/base.py b/pyicloud/base.py index 81d7707..65baa50 100644 --- a/pyicloud/base.py +++ b/pyicloud/base.py @@ -356,7 +356,7 @@ class PyiCloudService(object): if sys.version_info[0] >= 3: return as_unicode else: - return as_unicode.encode('ascii', 'ignore') + return as_unicode.encode('utf-8', 'ignore') def __repr__(self): return '<%s>' % str(self) diff --git a/pyicloud/services/findmyiphone.py b/pyicloud/services/findmyiphone.py index 9e15a8d..58941a8 100644 --- a/pyicloud/services/findmyiphone.py +++ b/pyicloud/services/findmyiphone.py @@ -85,7 +85,7 @@ class FindMyiPhoneServiceManager(object): if sys.version_info[0] >= 3: return as_unicode else: - return as_unicode.encode('ascii', 'ignore') + return as_unicode.encode('utf-8', 'ignore') def __repr__(self): return six.text_type(self) @@ -215,7 +215,7 @@ class AppleDevice(object): if sys.version_info[0] >= 3: return as_unicode else: - return as_unicode.encode('ascii', 'ignore') + return as_unicode.encode('utf-8', 'ignore') def __repr__(self): return '' % str(self) diff --git a/pyicloud/services/ubiquity.py b/pyicloud/services/ubiquity.py index 30c7ec5..5cb6020 100644 --- a/pyicloud/services/ubiquity.py +++ b/pyicloud/services/ubiquity.py @@ -112,7 +112,7 @@ class UbiquityNode(object): if sys.version_info[0] >= 3: return as_unicode else: - return as_unicode.encode('ascii', 'ignore') + return as_unicode.encode('utf-8', 'ignore') def __repr__(self): return "<%s: '%s'>" % (