diff --git a/gradint-build/src/frontend.py b/gradint-build/src/frontend.py
index 57df42e153bad269aab4758eec6aa2c8add20c48..0c542a7a3cb0efe0dfdda14d4779184e858359a4 100644
--- a/gradint-build/src/frontend.py
+++ b/gradint-build/src/frontend.py
@@ -73,7 +73,8 @@ def primitive_synthloop():
         global justSynthesize,warnings_printed
         if appuifw:
             justSynthesize=appuifw.query(u"Say:","text",u""+justSynthesize)
-            if not justSynthesize: break
+            if justSynthesize: justSynthesize=justSynthesize.encode("utf-8")
+            else: break
         else:
             try: justSynthesize=raw_input(cond(winCEsound and warnings_printed,"(see warnings under this window) Say:","Say: ")) # (WinCE uses an input box so need to repeat the warnings if any - but can't because prompt is size-limited, so need to say move the window.)
             except EOFError: break