From f1aac15f9eeac6d26854404414691d021ffb9d8e Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 23 Aug 2012 13:54:26 +0900 Subject: [PATCH] make sure to encode js errors before writing to console --- aqt/webview.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aqt/webview.py b/aqt/webview.py index 845b0ad91..e4893fe66 100644 --- a/aqt/webview.py +++ b/aqt/webview.py @@ -134,7 +134,8 @@ button { def _jsErr(self, msg, line, srcID): sys.stdout.write( - _("JS error on line %(a)d: %(b)s") % dict(a=line, b=msg+"\n")) + (_("JS error on line %(a)d: %(b)s") % + dict(a=line, b=msg+"\n")).encode("utf8")) def _linkHandler(self, url): self.linkHandler(url.toString())