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 Jac0, eryksun, ezio.melotti, paul.moore, steve.dower, tim.golden, vstinner, zach.ware
Date 2017-12-22.13:24:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1513949089.95.0.213398074469.issue32409@psf.upfronthosting.co.za>
In-reply-to
Content
The CMD shell decodes batch scripts using the attached console's output codepage, which defaults to OEM. OTOH, venv writes the replacement values for the template activate.bat as UTF-8 (codepage 65001), which is correct and should not be downgraded to OEM. 

Instead, the batch script could temporarily switch the console to codepage 65001. Then restore the previous codepage at the end. For example:

    @echo off
    for /f "tokens=2 delims=:" %%a in ('"%SystemRoot%\System32\chcp.com"') do (
        set "CODEPAGE=%%a"
    )
    "%SystemRoot%\System32\chcp.com" 65001 > nul

[rest of script]

    "%SystemRoot%\System32\chcp.com" %CODEPAGE% > nul
    set "CODEPAGE="
    :END
History
Date User Action Args
2017-12-22 13:24:50eryksunsetrecipients: + eryksun, paul.moore, vstinner, tim.golden, ezio.melotti, zach.ware, steve.dower, Jac0
2017-12-22 13:24:49eryksunsetmessageid: <1513949089.95.0.213398074469.issue32409@psf.upfronthosting.co.za>
2017-12-22 13:24:49eryksunlinkissue32409 messages
2017-12-22 13:24:49eryksuncreate