STINNER Victor <victor.stin...@haypocalc.com> added the comment: > The wchar_t strings themselves are built with mbstowcs(), > the file system encoding is not used.
Oops sorry, you are right, and it's worse :-) sys.argv is decoded using the locale encoding, but subprocess & cie use the file system encoding for the reverse operation. => it doesn't work if both encodings are different (#4388, #8775). The pseudo-code to create sys.argv on Unix is: # argv is a bytes list encoding = locale.getpreferredencoding() sys.argv = [arg.decode(encoding, 'surrogateescape') for arg in argv] ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8776> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com