unicode_to_argv == id on win32

This commit is contained in:
Jean-Paul Calderone 2021-01-12 14:44:00 -05:00
parent 183ee10035
commit e3a805caa7

View File

@ -129,10 +129,12 @@ def unicode_to_argv(s, mangle=False):
""" """
Make the given unicode string suitable for use in an argv list. Make the given unicode string suitable for use in an argv list.
On Python 2, this encodes using UTF-8. On Python 3, this returns the On Python 2 on POSIX, this encodes using UTF-8. On Python 3 and on
input unmodified. Windows, this returns the input unmodified.
""" """
precondition(isinstance(s, unicode), s) precondition(isinstance(s, unicode), s)
if sys.platform == "win32":
return s
return ensure_str(s) return ensure_str(s)