Closed BraveChicken1 closed 1 year ago
Can you please elaborate why this is necessary? Doesn't the HC API send the right encoding in the HTTP header?
The unit attribute isn't decoded properly: °C is decoded as °C
Wouldn't it work to supply this as a kwarg to SSEClient
? I find it questionable to hard-code it in the sseclient module. Normally requests should autodetect the encoding.
Supplying it as a kwarg wouldn't work because the kwarg is passed to the requests.get method which doesn't allow setting the encoding. It is strange to hard-code it, but I think it's the easiest way to do it.
This PR sets the event stream encoding to UTF-8 to prevent symbol issues.