[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2011-11-28 Thread STINNER Victor
STINNER Victor added the comment: > Is subprocess affected by PYTHONIOENCODING? Yes, as any Python process. -- ___ Python tracker ___ ___

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2011-11-28 Thread Éric Araujo
Éric Araujo added the comment: Is subprocess affected by PYTHONIOENCODING? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2011-11-26 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2011-11-22 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2011-11-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Firstly, I don't think it makes any sense to set encoding information > globally for the Popen object. As a simple example, consider using > Python to write a test suite for the iconv command line tool: there's > only one Popen instance (for the iconv call), b

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2011-11-20 Thread Nick Coghlan
Nick Coghlan added the comment: I discovered this same problem recently when updating the subprocess docs, and also in working on the improved shell invocation support I am proposing for 3.3 (#13238). I initially posted an earlier variant this suggestion as a new issue (#13442), but Victor r

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2010-12-01 Thread STINNER Victor
STINNER Victor added the comment: > ... it always seems to use the local 8-bit encoding The locale encoding is not necessary a 8-bit encoding, it can by a multibyte like... UTF-8 :-) -- subprocess.patch: You should maybe use io.open(process.stdout.fileno(), encoding=..., errors=...) instead

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2010-12-01 Thread STINNER Victor
STINNER Victor added the comment: About the topic: > subprocess seems to use local 8-bit encoding and gives no choice I don't understand that: by default, Python 2 and Python 3 use byte strings, so there is no encoding (nor error handler). I don't see how you can get unicode from a process onl

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2010-11-20 Thread Ned Deily
Changes by Ned Deily : -- nosy: +haypo -BreamoreBoy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2010-07-24 Thread Mark Lawrence
Mark Lawrence added the comment: In 2.7 and py3k test_subprocess has a class BaseTestCase which has a assertStderrEqual method. These don't exist in 3.1. I believe that the py3k code will need to be backported to 3.1. Can this be done on this issue, or do we need a new one to keep things c

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2010-07-22 Thread Mark Lawrence
Mark Lawrence added the comment: Ran new unit test before and after patching subprocess on Windows Vista against 3.1 debug maintenance release, all ok apart from this at end of latter. File "test\test_subprocess.py", line 568, in test_encoded_stderr self.assertEqual(p.stderr.read(), send

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2009-12-31 Thread Mark Summerfield
Mark Summerfield added the comment: On Thu, Dec 31, 2009 at 1:30 PM, Amaury Forgeot d'Arc wrote: > > Amaury Forgeot d'Arc added the comment: > > I don't understand. How is the subprocess stdout related to the main > program output? > Stream-specific encoding could be useful for subprocesses th

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2009-12-31 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: I don't understand. How is the subprocess stdout related to the main program output? Stream-specific encoding could be useful for subprocesses that expect latin-1 from stdin but write utf-8 to stdout. I'm not sure we should support this. -- _

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2009-12-31 Thread Mark Summerfield
Mark Summerfield added the comment: I agree with Florian Mayer that the encoding handling should be stream-specific. You could easily be reading the stdout of some third party program that uses, say, latin1, but want to do your own output in, say, utf-8. One solution that builds on what Amaury

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

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

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2009-06-13 Thread Florian Mayer
Changes by Florian Mayer : Added file: http://bugs.python.org/file14295/test_subprocess3.py.patch ___ Python tracker ___ ___ Python-bugs-list m

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2009-06-13 Thread Florian Mayer
Florian Mayer added the comment: Should we also cover the unusual case where stdout, stderr and stdin have different encodings, because now we are assuming the are all the same. -- ___ Python tracker __

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2009-06-13 Thread Florian Mayer
Changes by Florian Mayer : Added file: http://bugs.python.org/file14294/subprocess3.patch ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2009-06-13 Thread Florian Mayer
Changes by Florian Mayer : Added file: http://bugs.python.org/file14293/subprocess.patch ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2009-06-13 Thread Florian Mayer
Changes by Florian Mayer : Removed file: http://bugs.python.org/file14291/subprocess3.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2009-06-13 Thread Florian Mayer
Changes by Florian Mayer : Removed file: http://bugs.python.org/file14289/subprocess.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2009-06-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Two things: 1. The argument should be called `errors` for consistency with open() and TextIOWrapper(), not `error` 2. You should add some unit tests. -- nosy: +pitrou stage: needs patch -> patch review versions: +Python 2.7, Python 3.2 -Python 2.6, Pyth

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2009-06-13 Thread Florian Mayer
Changes by Florian Mayer : Removed file: http://bugs.python.org/file14290/subprocess3.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2009-06-13 Thread Florian Mayer
Changes by Florian Mayer : Added file: http://bugs.python.org/file14291/subprocess3.patch ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2009-06-13 Thread Florian Mayer
Changes by Florian Mayer : Added file: http://bugs.python.org/file14290/subprocess3.patch ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2009-06-13 Thread Florian Mayer
Changes by Florian Mayer : Removed file: http://bugs.python.org/file14286/subprocess.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2009-06-13 Thread Florian Mayer
Florian Mayer added the comment: Cosmetic update. -- Added file: http://bugs.python.org/file14289/subprocess.patch ___ Python tracker ___

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2009-06-13 Thread Florian Mayer
Florian Mayer added the comment: I wrote a patch to add encoding and error to subprocess.Popen in Python 2.7 (trunk). -- keywords: +patch nosy: +segfaulthunter Added file: http://bugs.python.org/file14286/subprocess.patch ___ Python tracker

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2009-06-12 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: I propose to add two parameters (encoding, error) to the subprocess.Popen function. - python 2.x could build and return codecs.StreamReader objects - python 3.x would just pass these parameters to io.TextIOWrapper I'll try to come with a patch. -

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2009-06-08 Thread Sridhar Ratnakumar
Sridhar Ratnakumar added the comment: Related discussion thread: https://answers.launchpad.net/bzr/+question/63601 -- ___ Python tracker ___ _

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2009-06-08 Thread Sridhar Ratnakumar
Changes by Sridhar Ratnakumar : -- versions: +Python 2.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2009-06-08 Thread Sridhar Ratnakumar
Changes by Sridhar Ratnakumar : -- nosy: +srid ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2009-05-28 Thread Mark Summerfield
New submission from Mark Summerfield : When I start a process with subprocess.Popen() and pipe the stdin and stdout, it always seems to use the local 8-bit encoding. I tried setting process.stdin.encoding = "utf8" and the same for stdout (where process is the subprocess object), but to no avail.