mwh@sourceforge found that UnicodeError can be raised by compiling.
Its base class ValueError can be raised too, so catch that.
diff --git a/Lib/code.py b/Lib/code.py
index 3cd33de..846cd04 100644
--- a/Lib/code.py
+++ b/Lib/code.py
@@ -70,7 +70,7 @@
         """
         try:
             code = compile_command(source, filename, symbol)
-        except (OverflowError, SyntaxError):
+        except (OverflowError, SyntaxError, ValueError):
             # Case 1
             self.showsyntaxerror(filename)
             return 0