[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

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

2010-08-08 Thread Shahar Or
Changes by Shahar Or em...@shahar-or.co.il: -- nosy: -DawnLight ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1759845 ___ ___ Python-bugs-list

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

2010-08-08 Thread Tim Golden
Tim Golden m...@timgolden.me.uk 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: code import subprocess FILENAME = abc£.bat FILENAME.encode (ascii) # # UnicodeEncodeError # with open

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

2010-08-04 Thread Kuang-che Wu
Kuang-che Wu k...@csie.org 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

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

2010-08-04 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Thanks for the simple explanation. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1759845 ___

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

2010-08-04 Thread Greg Couch
Greg Couch gr...@cgl.ucsf.edu added the comment: So Terry, can you reopen this bug then? It's not out of date. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1759845 ___

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

2010-08-04 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu 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

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

2010-08-03 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu 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

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

2009-12-31 Thread Shahar Or
Changes by Shahar Or em...@shahar-or.co.il: -- nosy: +DawnLight ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1759845 ___ ___ Python-bugs-list

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

2009-05-11 Thread Kuang-che Wu
Kuang-che Wu k...@csie.org 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 rep...@bugs.python.org

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

2009-05-11 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com 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

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

2009-05-11 Thread Greg Couch
Greg Couch gr...@cgl.ucsf.edu 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

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

2009-05-11 Thread Kuang-che Wu
Kuang-che Wu k...@csie.org 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

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

2008-12-14 Thread xianyiteng
Changes by xianyiteng xytxyt...@gmail.com: -- nosy: +xianyiteng ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1759845 ___ ___ Python-bugs-list

[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:

[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] http://bugs.python.org/issue1759845 ___ ___ Python-bugs-list mailing