diff --git a/IPython/core/interactiveshell.py b/IPython/core/interactiveshell.py index 46e423f..8dc0e8f 100644 --- a/IPython/core/interactiveshell.py +++ b/IPython/core/interactiveshell.py @@ -2082,6 +2082,7 @@ class InteractiveShell(SingletonConfigurable, Magic): with AvoidUNCPath() as path: if path is not None: cmd = '"pushd %s &&"%s' % (path, cmd) + cmd = cmd.encode(sys.stdin.encoding) ec = os.system(cmd) else: ec = os.system(cmd)