• samstagern's avatar
    bpo-32409: Fix regression in activate.bat on international Windows (GH-10295) · c64583b6
    samstagern authored
    Handle Unicode contents on localised Windows systems when activating a
    venv. activate.bat currently breaks on German Windows systems, as chcp.com does
    not return a plain number as on English systems, but (arbitrarily) appends a dot at the end
    (for example "Aktive Codepage: 850." instead of "Active Codepage: 850"). The
    dependency to chcp.com is removed and ctypes is used to get, set and restore the
    console output code page. The code page for console input is not changed.
    
    We can't use __VENV_PYTHON__ to find python.exe, since it's UTF-8. cmd.exe decodes
    the script using the console output code page.
    c64583b6
2018-11-02-12-01-00.bpo-32409.MFRX2Q.rst 136 Bytes