From 570b06767310c17fe913ed86802f1f3f8f98f266 Mon Sep 17 00:00:00 2001 From: Emmanuel Beffara Date: Mon, 10 Apr 2017 13:42:18 +0200 Subject: [PATCH] Decode the input before building XML commands. --- autoload/coqtop.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/coqtop.py b/autoload/coqtop.py index 233b60d..98bd75f 100644 --- a/autoload/coqtop.py +++ b/autoload/coqtop.py @@ -104,7 +104,7 @@ def encode_value(v): xml = build('bool', str(v).lower()) xml.text = str(v) return xml - elif isinstance(v, str): + elif isinstance(v, str) or isinstance(v, unicode): xml = build('string') xml.text = v return xml @@ -244,7 +244,7 @@ def cur_state(): def advance(cmd, encoding = 'utf-8'): global state_id - r = call('Add', ((cmd, -1), (cur_state(), True)), encoding) + r = call('Add', ((cmd.decode(encoding), -1), (cur_state(), True)), encoding) if r is None: return r if isinstance(r, Err):