diff --git a/pronterface.py b/pronterface.py index 2ef102b..3461e99 100755 --- a/pronterface.py +++ b/pronterface.py @@ -485,14 +485,14 @@ class PronterWindow(wx.Frame,pronsole.pronsole): if macro == "": return self.new_macro() if self.macros.has_key(macro): old_def = self.macros[macro] - elif hasattr(self.__class__,"do_"+macro): - print _("Name '%s' is being used by built-in command") % macro - return - elif len([c for c in macro if not c.isalnum() and c != "_"]): - print _("Macro name may contain only alphanumeric symbols and underscores") + elif len([c for c in macro.encode("ascii","replace") if not c.isalnum() and c != "_"]): + print _("Macro name may contain only ASCII alphanumeric symbols and underscores") if webavail: self.webInterface.AddLog("Macro name may contain only alphanumeric symbols and underscores") return + elif hasattr(self.__class__,"do_"+macro): + print _("Name '%s' is being used by built-in command") % macro + return else: old_def = "" self.start_macro(macro,old_def)