Code

Allow inkex.errormsg() to handle non-ASCII characters. Fixes bug 246931.
authorsasilver <sasilver@users.sourceforge.net>
Thu, 10 Jul 2008 09:06:47 +0000 (09:06 +0000)
committersasilver <sasilver@users.sourceforge.net>
Thu, 10 Jul 2008 09:06:47 +0000 (09:06 +0000)
share/extensions/inkex.py

index 96dc7b7ae46c6af42de3d9259523207d50deb295..01488880bf93e38fe5e2eea9b63ac5d12ea47819 100755 (executable)
@@ -78,7 +78,7 @@ def errormsg(msg):
          ...
          inkex.errormsg(_("This extension requires two selected paths."))
     """
-    sys.stderr.write(str(msg) + "\n")
+    sys.stderr.write((msg + "\n").encode("UTF-8"))
 
 def check_inkbool(option, opt, value):
     if str(value).capitalize() == 'True':