I was writing an AutoHotKey script that uses mosquitto_pub to publish the current active window title on my desktop to HA. Everything works great until I pull up a window that has a Unicode character in the name. An excellent example of this is the “Overview – Home Assistant” title on the dashboard of HA (the dash is “EN DASH” U+2013). When one of these titles is published, I see the proper values in the broker using MQTT Explorer, however the state never updates in HA. Non-unicode-containing titles work fine.
Is this a known issue or am I misconfiguring the sensor somehow?
Update: I did find this in the debug logs for MQTT:
2023-01-25 08:43:08.504 WARNING (MainThread) [homeassistant.components.mqtt.client] Can't decode payload b'Overview \x96 Home Assistant - Brave' on mosquitto/<redacted>/<redacted>/activewindow with encoding utf-8 (for <Job HassJobType.Callback <function MqttSensor._prepare_subscribe_topics.<locals>.message_received at 0x7fa3c5905d80>>)
So at least that’s a confirmation that it doesn’t like the UTF-8 character. Still not sure how to resolve this though.