[issue1759845] subprocess.call fails with unicode strings in command line

2017-10-04 Thread Safihre
Safihre added the comment: Although this issue is very old, in case anyone else like us need this functionality I created a package that implements the proposed C-fix. https://pypi.python.org/pypi/subprocessww Simply "import subprocessww" and POpen is patched. We tested it and it does the job

[issue1759845] subprocess.call fails with unicode strings in command line

2010-08-08 Thread Tim Golden
Tim Golden added the comment: To confirm the situation on 3.x: a unicode string with non-ascii-encodable characters is fine. The easy test here in the uk is a pound sign: import subprocess FILENAME = "abc£.bat" FILENAME.encode ("ascii") # # UnicodeEncodeError # with open (FILENAME, "w") as f

[issue1759845] subprocess.call fails with unicode strings in command line

2010-08-08 Thread Shahar Or
Changes by Shahar Or : -- nosy: -DawnLight ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue1759845] subprocess.call fails with unicode strings in command line

2010-08-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: I will not reopen this now for the reasons I already stated after "In any case ...". To expand on that. 1. 2.7 is in maintenance (bug-fix only) mode and I view this a feature request. To persuade someone otherwise, quote some doc that clearly says subprocess

[issue1759845] subprocess.call fails with unicode strings in command line

2010-08-04 Thread Greg Couch
Greg Couch added the comment: So Terry, can you reopen this bug then? It's not out of date. -- ___ Python tracker ___ ___ Python-b

[issue1759845] subprocess.call fails with unicode strings in command line

2010-08-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thanks for the simple explanation. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue1759845] subprocess.call fails with unicode strings in command line

2010-08-04 Thread Kuang-che Wu
Kuang-che Wu added the comment: > I fail to see why subprocess.call(cmd.encode('whatever')) is not a general > solution. Because 'whatever' encoding doesn't exist. Assume cmd contains Japanese characters and my system is Chinese windows. subprocess.call expect the argument is encoded in mbcs,

[issue1759845] subprocess.call fails with unicode strings in command line

2010-08-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: I fail to see why subprocess.call(cmd.encode('whatever')) is not a general solution. Auto-encoding strikes me as wrong. Someone who wants that should write their own wrapper. In any case, 2.7 is out and closed to new features, while 3.x fixes this and numerou

[issue1759845] subprocess.call fails with unicode strings in command line

2009-12-31 Thread Shahar Or
Changes by Shahar Or : -- nosy: +DawnLight ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue1759845] subprocess.call fails with unicode strings in command line

2009-05-11 Thread Kuang-che Wu
Kuang-che Wu added the comment: There is slight difference between C and python patch. C version: convert mbcs argument to unicode py version: convert unicode argument to mbcs Actually, python version patch may not work if the string is unicode and cannot encoded by mbcs. For example, my window

[issue1759845] subprocess.call fails with unicode strings in command line

2009-05-11 Thread Greg Couch
Greg Couch added the comment: I like the C patch better. It only tries to decode non-unicode objects with the filesystem (mbcs) encoding. This fits in with Python 3.0 perfectly where all strings are unicode. In 2.5, strings are assumed to be in the mbcs encoding, to match the Windows ANSI API

[issue1759845] subprocess.call fails with unicode strings in command line

2009-05-11 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The first patch will introduce regressions for strings that cannot be decoded with the filesystem encoding. It is necessary to provide a fallback to the CreateProcessA function. I'd prefer the python-only patch, except for the "sys=sys" argument to the fu

[issue1759845] subprocess.call fails with unicode strings in command line

2009-05-11 Thread Kuang-che Wu
Kuang-che Wu added the comment: ocrean-city's patch applied cleanly with trunk and it works for me. Could anybody review and commit? I could help if any refinement required. -- nosy: +kcwu ___ Python tracker ___

[issue1759845] subprocess.call fails with unicode strings in command line

2008-12-14 Thread xianyiteng
Changes by xianyiteng : -- nosy: +xianyiteng ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue1759845] subprocess.call fails with unicode strings in command line

2008-10-01 Thread Greg Couch
Greg Couch <[EMAIL PROTECTED]> added the comment: We're having the same problem. My quick fix was to patch subprocess.py so the command line and executable are converted to the filesystem encoding (mbcs). -- nosy: +gregcouch Added file: http://bugs.python.org/file11674/Python-2.5.2-subp

[issue1759845] subprocess.call fails with unicode strings in command line

2008-08-26 Thread Anders J. Munch
Changes by Anders J. Munch <[EMAIL PROTECTED]>: -- nosy: +andersjm ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-list ma

[issue1759845] subprocess.call fails with unicode strings in command line

2008-03-01 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I tried to fix this problem using CreateProcessW. (environment variables are still ANSI) I don't know Python C API well, maybe I'm doing something wrong. (I confirmed test_subprocess.py passes) -- keywords: +patch nosy: +ocean-city Added file: http:/