This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 mark
收信人 mark
日期 2009-05-28.07:08:34
SpamBayes Score 4.0478887e-09
Marked as misclassified
Message-id <1243494524.57.0.870766192683.issue6135@psf.upfronthosting.co.za>
In-reply-to
内容
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.

I also tried using shell=True since on Mac, Terminal.app is fine with
Unicode, but that didn't work.

So basically, I have programs that output Unicode and run fine on the
Mac terminal, but that cannot be executed by subprocess because
subprocess uses the mac_roman encoding instead of Unicode.

I wish it were possible to specify the stdin and stdout encoding that is
used; then I could use the same one on all platforms. (But perhaps it is
possible, and I just haven't figured out how?)
历史
日期 用户 动作 参数
2009-05-28 07:08:44mark修改recipients: + mark
2009-05-28 07:08:44mark修改messageid: <1243494524.57.0.870766192683.issue6135@psf.upfronthosting.co.za>
2009-05-28 07:08:42mark链接issue6135 messages
2009-05-28 07:08:40mark创建