Hello !

When using "Run command in VM" I found this little bug with unicode chars.

UnicodeEncodeError: 'ascii' codec can't encode characters in position 
27-30: ordinal not in range(128)

This is most likely a bug in the Qubes Manager

----
line: vm, str(command_to_run), thread_monitor))
func: action_run_command_in_vm_triggered
line no.: 1407
file: /usr/lib64/python2.7/site-packages/qubesmanager/main.py

So I try to make a one-line patch and test it with non-ascii string.

xterm -hold -e 'echo "test-ั‚ะตัั‚"'

I guess this behavior exist in ver. 3.2 too.

See attached diff and screenshots.

-            vm, str(command_to_run), thread_monitor))
+            vm, unicode(command_to_run), thread_monitor))

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-devel+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-devel@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-devel/57820970-c420-412c-9482-21c44fb08284%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--- /usr/lib64/python2.7/site-packages/qubesmanager/main.py.orig	2016-09-29 23:18:15.732999994 +0600
+++ /usr/lib64/python2.7/site-packages/qubesmanager/main.py	2016-10-01 21:06:54.464999973 +0600
@@ -1404,7 +1404,7 @@
             return
         thread_monitor = ThreadMonitor()
         thread = threading.Thread(target=self.do_run_command_in_vm, args=(
-            vm, str(command_to_run), thread_monitor))
+            vm, unicode(command_to_run), thread_monitor))
         thread.daemon = True
         thread.start()
 
UnicodeEncodeError: 'ascii' codec can't encode characters in position 27-30: 
ordinal not in range(128)

This is most likely a bug in the Qubes Manager

----
line: vm, str(command_to_run), thread_monitor))
func: action_run_command_in_vm_triggered
line no.: 1407
file: /usr/lib64/python2.7/site-packages/qubesmanager/main.py

Reply via email to