-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-32409: Ensures activate.bat can handle Unicode contents #5757
Conversation
Lib/venv/scripts/nt/activate.bat
Outdated
@@ -30,3 +39,7 @@ if defined _OLD_VIRTUAL_PATH ( | |||
set "PATH=%VIRTUAL_ENV%\__VENV_BIN_NAME__;%PATH%" | |||
|
|||
:END | |||
if defined _OLD_CODEPAGE ( | |||
"%SystemRoot%\System32\chcp.com" %_OLD_CODEPAGE% > nul | |||
set _OLD_CODEPAGE= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you did above, there should be quotes around the assignment, just in case there's any white space at the end, e.g. set "_OLD_CODEPAGE="
.
Thanks @zooba for the PR 🌮🎉.. I'm working now to backport this PR to: 3.6, 3.7. |
GH-5765 is a backport of this pull request to the 3.7 branch. |
…-5757) (cherry picked from commit 6240917) Co-authored-by: Steve Dower <[email protected]>
GH-5766 is a backport of this pull request to the 3.6 branch. |
…-5757) (cherry picked from commit 6240917) Co-authored-by: Steve Dower <[email protected]>
This does not work on German systems: We had to revert to Python 3.6, because of this as it will not work on German (or Swiss German) Windows systems: activate.bat breaks on German systems as chcp does not return a plain number. Note the dot at the end:
This leads to
Fortunately it is easy to extract the number from there
|
https://bugs.python.org/issue32409