From b0074d3d12463ac5e56899d024ece9b63a48c621 Mon Sep 17 00:00:00 2001 From: David Lechner Date: Wed, 23 Nov 2022 12:03:10 -0600 Subject: [PATCH] uuids: remove invalid UTF-8 This removes some invalid UTF-8 characters. This was noticed when Bleak examples were run with `python -m trace --trace`. I caused the trace to crash with a UnicodeError. The Chinese name for Huawei has been removed from the Bluetooth assigned numbers doc so we removed all the Chinese names just to keep it simple. --- CHANGELOG.rst | 4 ++++ bleak/uuids.py | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 5b61afff..6f8c211b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -22,6 +22,10 @@ Changed * ``BLEDevice`` now uses ``__slots__`` to reduce memory usage. +Fixed +----- +- Fixed invalid UTF-8 in ``uuids.uuid16_dict``. + `0.19.5`_ (2022-11-19) ====================== diff --git a/bleak/uuids.py b/bleak/uuids.py index c368c614..0621c611 100644 --- a/bleak/uuids.py +++ b/bleak/uuids.py @@ -843,8 +843,8 @@ 0xFE83: "Blue Bite", 0xFE84: "RF Digital Corp", 0xFE85: "RF Digital Corp", - 0xFE86: "HUAWEI Technologies Co.: Ltd. ( 华为技术有限公司 )", - 0xFE87: "Qingdao Yeelink Information Technology Co.: Ltd. ( 青岛亿联客信息技术有限公司 )", + 0xFE86: "HUAWEI Technologies Co.: Ltd.", + 0xFE87: "Qingdao Yeelink Information Technology Co.: Ltd.", 0xFE88: "SALTO SYSTEMS S.L.", 0xFE89: "B&O Play A/S", 0xFE8A: "Apple: Inc.",