From 8d2397676368845f8149e53863d55b9d1d082d58 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sun, 9 Mar 2014 23:01:59 -0700 Subject: [PATCH] HTTPInterface is now UTF-8 compatible --- homeassistant/components/httpinterface/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/httpinterface/__init__.py b/homeassistant/components/httpinterface/__init__.py index cc9878e5046..9a38d9ce1d7 100644 --- a/homeassistant/components/httpinterface/__init__.py +++ b/homeassistant/components/httpinterface/__init__.py @@ -290,10 +290,10 @@ class RequestHandler(BaseHTTPRequestHandler): def _handle_get_root(self, path_match, data): """ Renders the debug interface. """ - write = lambda txt: self.wfile.write(txt+"\n") + write = lambda txt: self.wfile.write(txt.encode("UTF-8")+"\n") self.send_response(HTTP_OK) - self.send_header('Content-type', 'text/html') + self.send_header('Content-type', 'text/html; charset=utf-8') self.end_headers() write((""