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.
On Python 2, this encodes using UTF-8. On Python 3, this returns the
input unmodified.
On Python 2 on POSIX, this encodes using UTF-8. On Python 3 and on
Windows, this returns the input unmodified.
"""
precondition(isinstance(s, unicode), s)
if sys.platform == "win32":
return s
return ensure_str(s)