From 19a8079bc80f02f730d37835e4c13da45a48db33 Mon Sep 17 00:00:00 2001 From: Quentame Date: Sun, 9 Feb 2020 13:01:21 +0100 Subject: [PATCH] Use UTF-8 everywhere (#228) --- pyicloud/base.py | 2 +- pyicloud/services/findmyiphone.py | 4 ++-- pyicloud/services/ubiquity.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) 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'>" % (