From 697e332eb826191ab91ef82429efb72f1600b047 Mon Sep 17 00:00:00 2001 From: Markus Birth Date: Fri, 3 Nov 2017 11:46:31 +0100 Subject: [PATCH] Force proper encoding before handling XML. --- tcllib.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tcllib.py b/tcllib.py index 82437a8..bcfb3c6 100644 --- a/tcllib.py +++ b/tcllib.py @@ -175,6 +175,7 @@ class FotaCheck: last_response = req if req.status_code == 200: self.master_server_vote_on_time(reqtime, reqtime_avg) + req.encoding = "utf-8" # Force encoding as server doesn't give one self.write_dump(req.text) return req.text elif req.status_code == 204: @@ -282,6 +283,7 @@ class FotaCheck: #print(repr(dict(params))) req = self.sess.post(url, data=params) if req.status_code == 200: + req.encoding = "utf-8" # Force encoding as server doesn't give one self.write_dump(req.text) return req.text else: