diff --git a/IPython/core/interactiveshell.py b/IPython/core/interactiveshell.py index cef8d52..5ce338a 100644 --- a/IPython/core/interactiveshell.py +++ b/IPython/core/interactiveshell.py @@ -2085,6 +2085,7 @@ class InteractiveShell(SingletonConfigurable, Magic): cmd = py3compat.unicode_to_str(cmd) ec = os.system(cmd) else: + cmd = py3compat.unicode_to_str(cmd) ec = os.system(cmd) # We explicitly do NOT return the subprocess status code, because diff --git a/IPython/core/tests/test_interactiveshell.py b/IPython/core/tests/test_interactiveshell.py index ae4c596..31bb4af 100644 --- a/IPython/core/tests/test_interactiveshell.py +++ b/IPython/core/tests/test_interactiveshell.py @@ -220,3 +220,11 @@ class TestSafeExecfileNonAsciiPath(unittest.TestCase): """Test safe_execfile with non-ascii path """ _ip.shell.safe_execfile(self.fname, {}, raise_exceptions=True) + + +class TestSystemRaw(unittest.TestCase): + def test_1(self): + """Test system_raw with non-ascii cmd + """ + cmd = ur'''python -c "u'åäö'" ''' + _ip.shell.system_raw(cmd)