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.

Author eryksun
Recipients eryksun, ezio.melotti, jkloth, paul.moore, steve.dower, tim.golden, vstinner, zach.ware
Date 2018-09-10.03:55:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1536551757.15.0.56676864532.issue34618@psf.upfronthosting.co.za>
In-reply-to
Content
The interpreter uses the system ANSI codepage for non-console files. In your case this is codepage 1252. In my current setup I can't reproduce this issue since I'm using the new (beta) support in Windows 10 to configure the ANSI codepage as UTF-8 (65001).

You can force standard I/O to use UTF-8 by setting the environment variable PYTHONIOENCODING. Also, if you want the CompletedProcess stdout decoded as text, in 3.6+ you can pass the parameter `encoding='utf-8'`. For example:

    environ = os.environ.copy()
    environ['PYTHONIOENCODING'] = 'utf-8'
    p = subprocess.run([sys.executable, *args], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=environ, encoding='utf-8')
    print(p.stdout)
History
Date User Action Args
2018-09-10 03:55:57eryksunsetrecipients: + eryksun, paul.moore, vstinner, tim.golden, jkloth, ezio.melotti, zach.ware, steve.dower
2018-09-10 03:55:57eryksunsetmessageid: <1536551757.15.0.56676864532.issue34618@psf.upfronthosting.co.za>
2018-09-10 03:55:57eryksunlinkissue34618 messages
2018-09-10 03:55:56eryksuncreate