From 2773dfdedc3b5fa43d0754087bbd61967f505fbf Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Mon, 12 Jul 2021 08:52:26 +0200 Subject: [PATCH] i3-companion: if SSID is not UTF-8 encoded, use replace --- bin/i3-companion | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/i3-companion b/bin/i3-companion index 3638db6..c854d55 100755 --- a/bin/i3-companion +++ b/bin/i3-companion @@ -505,7 +505,7 @@ async def network_manager_status(i3, event, *args): name = await nmap.Ssid strength = int(await nmap.Strength) status.append(""[strength // 34]) - status.append(bytes(name).decode("utf-8")) + status.append(bytes(name).decode("utf-8", errors='replace')) elif ( kind == NM_DEVICE_TYPE_ETHERNET and state == NM_DEVICE_STATE_ACTIVATED