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
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
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
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
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
___
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
___
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
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
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
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
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
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
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
Changes by xianyiteng xytxyt...@gmail.com:
--
nosy: +xianyiteng
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1759845
___
___
Python-bugs-list
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:
Changes by Anders J. Munch [EMAIL PROTECTED]:
--
nosy: +andersjm
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1759845
___
___
Python-bugs-list mailing
16 matches
Mail list logo